From 3e76d568b0758166905acf87fe2f3057d140a3b7 Mon Sep 17 00:00:00 2001 From: Dave Date: Thu, 23 May 2024 15:11:20 +0200 Subject: [PATCH 01/14] make detections more strict --- dlt_init_openapi/detector/default/const.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dlt_init_openapi/detector/default/const.py b/dlt_init_openapi/detector/default/const.py index 61ea43a..d850b98 100644 --- a/dlt_init_openapi/detector/default/const.py +++ b/dlt_init_openapi/detector/default/const.py @@ -11,17 +11,17 @@ PRIMARY_KEY_SUFFIXES = ["id", "pk"] PRIMARY_KEY_WORD_SEPARATORS = ["", "-", "_"] -RE_UNIQUE_KEY = re.compile(r"\b(unique|id|identifier)\b", re.IGNORECASE) +RE_UNIQUE_KEY = re.compile(r"^(unique|id|identifier)$", re.IGNORECASE) # pagination -RE_PAGE_PARAM = re.compile(r"(?i)(page|page_number)", re.IGNORECASE) -RE_TOTAL_PAGE_PROPERTY = re.compile(r"(?i)(total|count)", re.IGNORECASE) -RE_OFFSET_PARAM = re.compile(r"(?i)(start|offset|skip)", re.IGNORECASE) -RE_LIMIT_PARAM = re.compile(r"(?i)(limit|per_page|page_size|size)", re.IGNORECASE) -RE_TOTAL_PROPERTY = re.compile(r"(?i)(total|count|total_count)", re.IGNORECASE) -RE_CURSOR_PARAM = re.compile(r"(?i)(cursor|after|since)", re.IGNORECASE) -RE_CURSOR_PROP = re.compile(r"(?i)(cursor|next_cursor)", re.IGNORECASE) -RE_NEXT_PROPERTY = re.compile(r"(?i)(next|next_url|more)", re.IGNORECASE) +RE_PAGE_PARAM = re.compile(r"^(page|page_number)$", re.IGNORECASE) +RE_TOTAL_PAGE_PROPERTY = re.compile(r"^(total|count|totalPages)$", re.IGNORECASE) +RE_OFFSET_PARAM = re.compile(r"^(start|offset|skip)$", re.IGNORECASE) +RE_LIMIT_PARAM = re.compile(r"^(limit|per_page|page_size|size)$", re.IGNORECASE) +RE_TOTAL_PROPERTY = re.compile(r"^(total|count|total_count|totalRecords|totalItems)$", re.IGNORECASE) +RE_CURSOR_PARAM = re.compile(r"^(cursor|after|since)$", re.IGNORECASE) +RE_CURSOR_PROP = re.compile(r"^(cursor|next_cursor)$", re.IGNORECASE) +RE_NEXT_PROPERTY = re.compile(r"^(next|next_url|more)$", re.IGNORECASE) RE_MATCH_ALL = re.compile(r".*", re.IGNORECASE) # content path discovery From 7aa53c98ebc25ec7ef51df5a9662ea962fffec09 Mon Sep 17 00:00:00 2001 From: Dave Date: Thu, 23 May 2024 15:17:18 +0200 Subject: [PATCH 02/14] add basic contributing page --- CONTRIBUTING.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e69de29..b0183b0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -0,0 +1,11 @@ +# Contributing to dlt-init-openapi + +To contribute to this Repo, you can do the following: + +1. [Join our slack community](https://dlthub.com/community) and talk to us so if you want to extend dlt-init-openapi. Until we have a more comprehensive contribution guide, we're happy to help you get started there. +2. Fork this repo and check it out +3. Install all dependencies with `make dev` (you will need poetry for dependency management) +4. Run the fast tests to verify that all is properly installed with `make test-fast` +5. Do you code changes, write new tests if you add new features. +6. Format and lint with `make format` and `make lint` +7. Create a PR to this repo. \ No newline at end of file From a7feb00a63742e81fc01b8506acf6ef2a0e71eca Mon Sep 17 00:00:00 2001 From: Dave Date: Thu, 23 May 2024 15:24:21 +0200 Subject: [PATCH 03/14] make endpoint selector message clearer and render all endpoints if none are selected --- dlt_init_openapi/__init__.py | 5 ++++- dlt_init_openapi/cli/cli_endpoint_selection.py | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlt_init_openapi/__init__.py b/dlt_init_openapi/__init__.py index 19108a1..5e95d64 100644 --- a/dlt_init_openapi/__init__.py +++ b/dlt_init_openapi/__init__.py @@ -57,7 +57,10 @@ def render(self, dry: bool = False) -> None: logger.info("Rendering project") if self.config.endpoint_filter: filtered_endpoints = self.config.endpoint_filter(self.openapi.endpoints) - self.openapi.endpoints.set_ids_to_render(filtered_endpoints) + if filtered_endpoints: + self.openapi.endpoints.set_ids_to_render(filtered_endpoints) + else: + logger.warning("You have not selected any endpoints, all endpoints will be rendered.") self.renderer.run(self.openapi, dry=dry) logger.success(f"Rendered project to: {self.config.project_dir}") logger.info("You can now run your pipeline from this folder with 'python pipeline.py'.") diff --git a/dlt_init_openapi/cli/cli_endpoint_selection.py b/dlt_init_openapi/cli/cli_endpoint_selection.py index 93c5c63..f902e8d 100644 --- a/dlt_init_openapi/cli/cli_endpoint_selection.py +++ b/dlt_init_openapi/cli/cli_endpoint_selection.py @@ -21,7 +21,9 @@ def questionary_endpoint_selection(endpoints: EndpointCollection) -> Set[str]: if not choices: raise ValueError("No endpoints found") selected_endpoints: List[Endpoint] = questionary.checkbox( - "Which resources would you like to generate?", choices + "Which resources would you like to generate? Press enter to continue, " + + "if you do not select any resources, all of them will be rendered.", + choices, ).ask() # return resource names of selected endpoints From 46b41341df0bbd4ba7dcbb7a73e80e805f42da06 Mon Sep 17 00:00:00 2001 From: Dave Date: Thu, 23 May 2024 15:36:53 +0200 Subject: [PATCH 04/14] improve description rendering and add it as a comment to the source output --- dlt_init_openapi/parser/endpoints.py | 18 +++++++++++++++++- .../renderer/default/templates/README.md.j2 | 4 ++-- .../renderer/default/templates/source.py.j2 | 3 +++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/dlt_init_openapi/parser/endpoints.py b/dlt_init_openapi/parser/endpoints.py index b94ed60..b5e8d9e 100644 --- a/dlt_init_openapi/parser/endpoints.py +++ b/dlt_init_openapi/parser/endpoints.py @@ -30,6 +30,7 @@ class Response: osp_response: osp.Response schema: Optional[SchemaWrapper] status_code: str + description: str # detected values detected_payload: Optional[DataPropertyPath] = None detected_primary_key: Optional[str] = None @@ -144,6 +145,14 @@ def default_for_param(self, location: Literal["path", "query"], param_name: str) return p.default return self.context.config.parameter_default_value + @property + def render_description(self) -> Optional[str]: + if self.description: + return self.description + if self.path_description: + return self.path_description + return None + @classmethod def from_operation( cls, @@ -172,7 +181,14 @@ def from_operation( content_schema = SchemaWrapper.from_reference(media_type.media_type_schema, context) break - responses.append(Response(osp_response=response_schema, schema=content_schema, status_code=status_code)) + responses.append( + Response( + osp_response=response_schema, + schema=content_schema, + status_code=status_code, + description=response_schema.description, + ) + ) return cls( method=method, diff --git a/dlt_init_openapi/renderer/default/templates/README.md.j2 b/dlt_init_openapi/renderer/default/templates/README.md.j2 index 3a56cfa..d81e258 100644 --- a/dlt_init_openapi/renderer/default/templates/README.md.j2 +++ b/dlt_init_openapi/renderer/default/templates/README.md.j2 @@ -15,6 +15,6 @@ secrets.toml. ## Available resources {% for endpoint in endpoint_collection.all_endpoints_to_render %} * {{ endpoint.detected_resource_name }} - _{{endpoint.method}} {{ endpoint.path }}_ - {% if endpoint.description %}{{endpoint.description}}{% endif %} + _{{endpoint.method}} {{ endpoint.path }}_ + {% if endpoint.render_description %}{{endpoint.render_description}}{% endif %} {% endfor %} diff --git a/dlt_init_openapi/renderer/default/templates/source.py.j2 b/dlt_init_openapi/renderer/default/templates/source.py.j2 index 83ee4b6..5e85a65 100644 --- a/dlt_init_openapi/renderer/default/templates/source.py.j2 +++ b/dlt_init_openapi/renderer/default/templates/source.py.j2 @@ -42,6 +42,9 @@ def {{ source_name }}( "resources": [ {% for endpoint in endpoint_collection.all_endpoints_to_render %} + {% if endpoint.render_description %} + # {{ endpoint.render_description}} + {% endif %} { "name": "{{ endpoint.detected_resource_name }}", "table_name": "{{ endpoint.detected_table_name }}", From f83d22ba0be11968c5f2ebad0c02a2dd4b837c5c Mon Sep 17 00:00:00 2001 From: Dave Date: Thu, 23 May 2024 15:42:30 +0200 Subject: [PATCH 05/14] fix rendering of endpoint descriptions --- dlt_init_openapi/parser/endpoints.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dlt_init_openapi/parser/endpoints.py b/dlt_init_openapi/parser/endpoints.py index b5e8d9e..146bdec 100644 --- a/dlt_init_openapi/parser/endpoints.py +++ b/dlt_init_openapi/parser/endpoints.py @@ -147,11 +147,10 @@ def default_for_param(self, location: Literal["path", "query"], param_name: str) @property def render_description(self) -> Optional[str]: - if self.description: - return self.description - if self.path_description: - return self.path_description - return None + description = self.description or self.path_description + if not description: + return None + return description.replace("\n", " ") @classmethod def from_operation( From 54e0653947481cac8bf24d4d6627dc930338fc47 Mon Sep 17 00:00:00 2001 From: Dave Date: Thu, 23 May 2024 16:10:51 +0200 Subject: [PATCH 06/14] tests for terminal exceptions exception for when no endpoints are found --- .../cli/cli_endpoint_selection.py | 2 - dlt_init_openapi/exceptions.py | 11 + dlt_init_openapi/parser/openapi_parser.py | 12 +- tests/cases/__init__.py | 7 +- .../art_institute_chicago_api.yaml | 0 tests/cases/error/coinpaprika.yaml | 224 ++++++++++++++++++ tests/cases/error/malformed_yaml.yaml | 4 + tests/integration/test_all_specs.py | 3 +- tests/integration/test_error_specs.py | 19 ++ tests/integration/utils.py | 2 +- 10 files changed, 277 insertions(+), 7 deletions(-) rename tests/cases/{other => error}/art_institute_chicago_api.yaml (100%) create mode 100644 tests/cases/error/coinpaprika.yaml create mode 100644 tests/cases/error/malformed_yaml.yaml create mode 100644 tests/integration/test_error_specs.py diff --git a/dlt_init_openapi/cli/cli_endpoint_selection.py b/dlt_init_openapi/cli/cli_endpoint_selection.py index f902e8d..af60e45 100644 --- a/dlt_init_openapi/cli/cli_endpoint_selection.py +++ b/dlt_init_openapi/cli/cli_endpoint_selection.py @@ -18,8 +18,6 @@ def questionary_endpoint_selection(endpoints: EndpointCollection) -> Set[str]: ("italic", f" {endpoint.path}"), ] choices.append(questionary.Choice(text, endpoint)) - if not choices: - raise ValueError("No endpoints found") selected_endpoints: List[Endpoint] = questionary.checkbox( "Which resources would you like to generate? Press enter to continue, " + "if you do not select any resources, all of them will be rendered.", diff --git a/dlt_init_openapi/exceptions.py b/dlt_init_openapi/exceptions.py index 90eba12..9da5615 100644 --- a/dlt_init_openapi/exceptions.py +++ b/dlt_init_openapi/exceptions.py @@ -1,3 +1,6 @@ +from typing import List + + class DltOpenAPIException(Exception): pass @@ -36,3 +39,11 @@ class DltUnparseableSpecException(DltOpenAPITerminalException): def __init__(self) -> None: super().__init__("Could not parse selected spec, please provide a valid YAML or JSON document.") + + +class DltNoEndpointsDiscovered(DltOpenAPITerminalException): + def __init__(self, enabled_methods: List[str]): + super().__init__( + f"Did not find any endpoint with http methods {enabled_methods} in provided OpenAPI spec. " + + "Please check your spec if endpoints with these methods exist or add additional methods in your config." + ) diff --git a/dlt_init_openapi/parser/openapi_parser.py b/dlt_init_openapi/parser/openapi_parser.py index ccef853..015575c 100644 --- a/dlt_init_openapi/parser/openapi_parser.py +++ b/dlt_init_openapi/parser/openapi_parser.py @@ -7,7 +7,12 @@ from loguru import logger from yaml import BaseLoader -from dlt_init_openapi.exceptions import DltInvalidSpecException, DltOpenAPINot30Exception, DltUnparseableSpecException +from dlt_init_openapi.exceptions import ( + DltInvalidSpecException, + DltNoEndpointsDiscovered, + DltOpenAPINot30Exception, + DltUnparseableSpecException, +) from dlt_init_openapi.parser.config import Config from dlt_init_openapi.parser.context import OpenapiContext from dlt_init_openapi.parser.endpoints import EndpointCollection @@ -34,7 +39,7 @@ def parse(self, data: bytes) -> None: self.spec_raw = self._load_yaml_or_json(data) self.security_schemes = {} - + print(self.spec_raw) logger.info("Validating spec structure") try: spec = osp.OpenAPI.parse_obj(self.spec_raw) @@ -73,6 +78,9 @@ def parse(self, data: bytes) -> None: self.endpoints = EndpointCollection.from_context(self.context) logger.success(f"Completed parsing endpoints. {len(self.endpoints.endpoints)} endpoints found.") + if len(self.endpoints.endpoints) == 0: + raise DltNoEndpointsDiscovered(self.config.include_methods) + def _load_yaml_or_json(self, data: bytes) -> Dict[str, Any]: logger.info("Trying to parse spec as JSON") try: diff --git a/tests/cases/__init__.py b/tests/cases/__init__.py index 33e8e06..b04d631 100644 --- a/tests/cases/__init__.py +++ b/tests/cases/__init__.py @@ -9,7 +9,12 @@ PREFIX = "./tests/cases" -CASE_FOLDERS = {"original": "original_specs", "artificial": "artificial_specs", "extracted": "extracted_specs"} +CASE_FOLDERS = { + "original": "original_specs", + "artificial": "artificial_specs", + "extracted": "extracted_specs", + "error": "error", +} def case_path(type: str, case: str) -> str: diff --git a/tests/cases/other/art_institute_chicago_api.yaml b/tests/cases/error/art_institute_chicago_api.yaml similarity index 100% rename from tests/cases/other/art_institute_chicago_api.yaml rename to tests/cases/error/art_institute_chicago_api.yaml diff --git a/tests/cases/error/coinpaprika.yaml b/tests/cases/error/coinpaprika.yaml new file mode 100644 index 0000000..9ea8737 --- /dev/null +++ b/tests/cases/error/coinpaprika.yaml @@ -0,0 +1,224 @@ +openapi: "3.0.0" + +info: + version: 1.7.8 + title: Coinpaprika API + x-logo: + url: "https://coinpaprika.com/static/files/df51e301.png#greywizard/rock-coin-web/assets/img/cp_logo-transparent.png" + backgroundColor: "#FAFAFA" + description: | + Coinpaprika API delivers precise & frequently updated market data from the world of crypto: coin prices, volumes, market caps, ATHs, return rates and more. + + # Introduction + If you want to use the Coinpaprika API, you have two main options: you can choose the API Free plan, which has sufficient limits for hobby and non-commercial use, or get one of the paid plans, ideal for commercial or professional use. To decide which plan is the best for you, check the [Plans and Pricing comparison](https://coinpaprika.com/api). + + Depending on the selected plan, you should send requests to the appropriate base URL: + + | Plan | Base URL | + |------------|-------------------------------------| + | Free | https://api.coinpaprika.com/v1/ | + | Starter | https://api-pro.coinpaprika.com/v1/ | + | Pro | https://api-pro.coinpaprika.com/v1/ | + | Business | https://api-pro.coinpaprika.com/v1/ | + | Enterprise | https://api-pro.coinpaprika.com/v1/ | + + # Authentication + If you use the Free plan, you don't need to set up an API key for each request. For other plans it is required. You can generate the API key in the Developer Portal after signing in. + + To provide the API key in REST API calls, set the `Authorization` header: + ``` + Authorization: + ``` + + # Standards and conventions + ## General + + * All endpoints return either a JSON object or array + * All timestamp related fields are in seconds + + ## Errors + * API errors are formatted as JSON: + ```{"error": ""}``` + * The API uses standard HTTP status codes to indicate a request failure: + * HTTP 4XX return codes are used for invalid requests - the issue is on the sender's side + * HTTP 5XX return codes are used for internal errors - the issue is on the server's side + + | HTTP Status | Description | + |---|---| + | 400 Bad Request | The server could not process the request due to invalid request parameters or invalid format of the parameters. | + | 402 Payment Required | The request could not be processed because of the user has an insufficient plan. If you want to be able to process this request, get a [higher plan](https://coinpaprika.com/api). | + | 403 Forbidden | The request could not be processed due to invalid API key. | + | 404 Not Found | The server could not process the request due to invalid URL or invalid path parameter. | + | 429 Too Many Requests | The rate limit has been exceeded. Reduce the frequency of requests to avoid this error. | + | 500 Internal Server Error | An unexpected server error has occured. | + + + # Rate limit + * The monthly number of requests is limited depending on the plan: + | Plan | Calls/month | + |------------|-------------------------------------| + | Free | 20 000 | + | Starter | 200 000 | + | Pro | 500 000 | + | Business | 3 000 000 | + | Enterprise | No limits | + + # API Clients + We provide the API clients in several popular programming languages: + * [PHP](https://github.com/coinpaprika/coinpaprika-api-php-client) + * [NodeJS](https://github.com/coinpaprika/coinpaprika-api-nodejs-client) + * [GO](https://github.com/coinpaprika/coinpaprika-api-go-client) + * [Swift](https://github.com/coinpaprika/coinpaprika-api-swift-client) + * [Kotlin](https://github.com/coinpaprika/coinpaprika-api-kotlin-client) + * [Python](https://github.com/coinpaprika/coinpaprika-api-python-client) + * [Google Sheets](https://github.com/coinpaprika/coinpaprika-google-sheet) + * Community Contributed Clients: + * [Rust](https://github.com/tokenomia-pro/coinpaprika-api-rust-client) built by tokenomia.pro + * [C#](https://github.com/MSiccDev/CoinpaprikaAPI) + * [JS](https://github.com/jaggedsoft/coinpaprika-js) + + **Note**: some of them may not be updated yet. We are working on improving them and they will be updated soon. If you'd like to contribute, please report issues and send PRs on Github. + + + # Terms of use + * [Download terms of use](https://coinpaprika.github.io/files/terms_of_use_v1.pdf) + # Archival documentations + * [API v1.2](https://api.coinpaprika.com/docs/1.2) + * [API v1.3](https://api.coinpaprika.com/docs/1.3) + * [API v1.4](https://api.coinpaprika.com/docs/1.4) + * [API v1.5](https://api.coinpaprika.com/docs/1.5) + * [API v1.6](https://api.coinpaprika.com/docs/1.6) + # Version history + ## 1.7.8 - 2024.01.24 + * Plan limits update + ## 1.7.7 - 2023.06.07 + * Added official Python client link + ## v1.7.6 - 2023.04.12 + * New intervals for OHLCV endpoint + ## v1.7.5 - 2022.12.07 + * Removed documentation for /beta/ endpoints + ## v1.7.4 - 2022.09.19 + * Key info endpoint + * Coin logo image URL + ## v1.7.3 - 2022.09.08 + * Plans update + ## v1.7.2 - 2022.07.22 + * Changelog endpoint documentation + ## v1.7.1 - 2022.07.14 + * Beta endpoints documentation + ## v1.7.0 - 2022.05.06 + * API-Pro documentation + ## v1.6.1 - 2020.12.09 + * Added information about first date with price data for currency ticker [/tickers](#operation/getTickers) and [/tickers/{coin_id}](#operation/getTickersById) + * Added redirect for historical tickers by contract address [/contracts/{platform_id}/{contract_address}/historical](#operation/getHistoricalTicker) + ## v1.6.0 - 2020.10.27 + * Added contracts section [/contracts](#operation/getPlatforms), [/contracts/{platform_id}](#operation/getContracts), + [/contracts/{platform_id}/{contract_address}](#operation/getTicker) + +servers: +- url: https://api.coinpaprika.com/v1 + +tags: +- name: "Key" +- name: "Global" +- name: "Coins" +- name: "People" +- name: "Tags" +- name: "Tickers" +- name: "Exchanges" +- name: "Tools" +- name: "Contracts" +- name: "Changelog" +- name: "Deprecated" + +paths: + # Global + /key/info: + $ref: "paths/key.yml#/info" + + # Global + /global: + $ref: "paths/global.yml#/global" + + # Coins + /coins: + $ref: "paths/coins.yml#/coins" + + /coins/{coin_id}: + $ref: "paths/coins.yml#/coin_by_id" + + /coins/{coin_id}/twitter: + $ref: "paths/coins.yml#/twitter" + + /coins/{coin_id}/events: + $ref: "paths/coins.yml#/events" + + /coins/{coin_id}/exchanges: + $ref: "paths/coins.yml#/exchanges_by_coin_id" + + /coins/{coin_id}/markets: + $ref: "paths/coins.yml#/markets_by_coin_id" + + /coins/{coin_id}/ohlcv/latest/: + $ref: "paths/coins.yml#/coins_ohlcv_latest" + + /coins/{coin_id}/ohlcv/historical: + $ref: "paths/coins.yml#/coins_ohlcv_historical" + + /coins/{coin_id}/ohlcv/today/: + $ref: "paths/coins.yml#/coins_ohlcv_today" + + # People + /people/{person_id}: + $ref: "paths/people.yml#/person_by_id" + + # Tags + /tags: + $ref: "paths/tags.yml#/tags" + /tags/{tag_id}: + $ref: "paths/tags.yml#/tag_by_id" + + # Tickers + /tickers: + $ref: "paths/tickers.yml#/tickers" + + /tickers/{coin_id}: + $ref: "paths/tickers.yml#/tickers_by_id" + + /tickers/{coin_id}/historical: + $ref: "paths/tickers.yml#/tickers_historical" + + # Exchanges + /exchanges: + $ref: "paths/exchanges.yml#/exchanges" + /exchanges/{exchange_id}: + $ref: "paths/exchanges.yml#/exchange_by_id" + /exchanges/{exchange_id}/markets: + $ref: "paths/exchanges.yml#/markets_by_exchange_id" + + # Contracts + /contracts: + $ref: "paths/contracts.yml#/platforms" + /contracts/{platform_id}: + $ref: "paths/contracts.yml#/contracts_by_platform" + /contracts/{platform_id}/{contract_address}: + $ref: "paths/contracts.yml#/ticker_redirect" + /contracts/{platform_id}/{contract_address}/historical: + $ref: "paths/contracts.yml#/ticker_historical_redirect" + + # Changelog + /changelog/ids: + $ref: "paths/changelog.yml#/ids" + + # Tools + /search: + $ref: "paths/tools.yml#/search" + /price-converter: + $ref: "paths/tools.yml#/price_converter" + + # Deprecated + /ticker: + $ref: "paths/deprecated.yml#/ticker_deprecated" + + /ticker/{coin_id}: + $ref: "paths/deprecated.yml#/ticker_by_coin_id_deprecated" diff --git a/tests/cases/error/malformed_yaml.yaml b/tests/cases/error/malformed_yaml.yaml new file mode 100644 index 0000000..73d652e --- /dev/null +++ b/tests/cases/error/malformed_yaml.yaml @@ -0,0 +1,4 @@ +def test_all_specs(case: str) -> None: + for skipped in SKIP_CASES: + if skipped in case: + return \ No newline at end of file diff --git a/tests/integration/test_all_specs.py b/tests/integration/test_all_specs.py index 2f2d6d1..7878d15 100644 --- a/tests/integration/test_all_specs.py +++ b/tests/integration/test_all_specs.py @@ -3,7 +3,8 @@ from tests.integration.utils import get_all_spec_paths, get_source -SKIP_CASES = ["zoom_with_pagination", "art_institute_chicago_api"] # broken spec # swagger 2.0 spec +# do not test specs in error folder +SKIP_CASES = ["zoom_with_pagination", "/error/"] @pytest.mark.slow diff --git a/tests/integration/test_error_specs.py b/tests/integration/test_error_specs.py new file mode 100644 index 0000000..18e20a3 --- /dev/null +++ b/tests/integration/test_error_specs.py @@ -0,0 +1,19 @@ +import pytest + +from dlt_init_openapi.exceptions import DltNoEndpointsDiscovered, DltOpenAPINot30Exception, DltUnparseableSpecException +from tests.integration.utils import get_dict_by_case + + +def test_no_endoint_discovered() -> None: + with pytest.raises(DltNoEndpointsDiscovered): + get_dict_by_case("error", "coinpaprika.yaml") + + +def test_not_openapi_30() -> None: + with pytest.raises(DltOpenAPINot30Exception): + get_dict_by_case("error", "art_institute_chicago_api.yaml") + + +def test_not_parseable() -> None: + with pytest.raises(DltUnparseableSpecException): + get_dict_by_case("error", "malformed_yaml.yaml") diff --git a/tests/integration/utils.py b/tests/integration/utils.py index 3100b56..1a07a8d 100644 --- a/tests/integration/utils.py +++ b/tests/integration/utils.py @@ -13,7 +13,7 @@ LOCAL_DIR = "tests/_local/" -TType = Literal["artificial", "original", "extracted"] +TType = Literal["artificial", "original", "extracted", "error"] def get_detected_project_from_open_api(case: str, config: Config) -> Project: From 268b6819a3d1f0bbadfdaee622c6835b84140197 Mon Sep 17 00:00:00 2001 From: Dave Date: Thu, 23 May 2024 16:32:35 +0200 Subject: [PATCH 07/14] fix marvel case --- dlt_init_openapi/parser/endpoints.py | 2 +- .../marvel_with_pagination_and_json_path.yml | 250 ++++++++++++++++++ .../extracted/test_marvel_cases.py | 29 ++ 3 files changed, 280 insertions(+), 1 deletion(-) create mode 100644 tests/cases/extracted_specs/marvel_with_pagination_and_json_path.yml create mode 100644 tests/integration/extracted/test_marvel_cases.py diff --git a/dlt_init_openapi/parser/endpoints.py b/dlt_init_openapi/parser/endpoints.py index 146bdec..87b00d2 100644 --- a/dlt_init_openapi/parser/endpoints.py +++ b/dlt_init_openapi/parser/endpoints.py @@ -176,7 +176,7 @@ def from_operation( response_schema = context.response_from_reference(response_ref) content_schema: Optional[SchemaWrapper] = None for content_type, media_type in (response_schema.content or {}).items(): - if content_type.endswith("json") and media_type.media_type_schema: + if (content_type.endswith("json") or content_type == "*/*") and media_type.media_type_schema: content_schema = SchemaWrapper.from_reference(media_type.media_type_schema, context) break diff --git a/tests/cases/extracted_specs/marvel_with_pagination_and_json_path.yml b/tests/cases/extracted_specs/marvel_with_pagination_and_json_path.yml new file mode 100644 index 0000000..7d1ca73 --- /dev/null +++ b/tests/cases/extracted_specs/marvel_with_pagination_and_json_path.yml @@ -0,0 +1,250 @@ +openapi: 3.0.1 +info: + title: gateway.marvel.com + version: Cable +servers: +- url: http://gateway.marvel.com/ +tags: +- name: public +paths: + + /v1/public/characters/{characterId}/events: + get: + tags: + - public + summary: Fetches lists of events filtered by a character id. + description: Fetches lists of events in which a specific character appears, + with optional filters. See notes on individual parameters below. + operationId: getCharacterEventsCollection + parameters: + - name: characterId + in: path + description: The character ID. + required: true + schema: + type: integer + format: int32 + - name: name + in: query + description: Filter the event list by name. + schema: + type: string + - name: nameStartsWith + in: query + description: Return events with names that begin with the specified string + (e.g. Sp). + schema: + type: string + - name: modifiedSince + in: query + description: Return only events which have been modified since the specified + date. + schema: + type: string + format: date + - name: creators + in: query + description: Return only events which feature work by the specified creators + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: series + in: query + description: Return only events which are part of the specified series (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: comics + in: query + description: Return only events which take place in the specified comics (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: stories + in: query + description: Return only events which contain the specified stories (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/EventDataWrapper' + +components: + schemas: + + EventList: + type: object + properties: + available: + type: integer + description: The number of total available events in this list. Will always + be greater than or equal to the "returned" value. + format: int32 + returned: + type: integer + description: The number of events returned in this collection (up to 20). + format: int32 + collectionURI: + type: string + description: The path to the full list of events in this collection. + items: + type: array + description: The list of returned events in this collection. + items: + $ref: '#/components/schemas/EventSummary' + Image: + type: object + properties: + path: + type: string + description: The directory path of to the image. + extension: + type: string + description: The file extension for the image. + Url: + type: object + properties: + type: + type: string + description: A text identifier for the URL. + url: + type: string + description: A full URL (including scheme, domain, and path). + EventDataContainer: + type: object + properties: + offset: + type: integer + description: The requested offset (number of skipped results) of the call. + format: int32 + limit: + type: integer + description: The requested result limit. + format: int32 + total: + type: integer + description: The total number of resources available given the current filter + set. + format: int32 + count: + type: integer + description: The total number of results returned by this call. + format: int32 + results: + type: array + description: The list of events returned by the call + items: + $ref: '#/components/schemas/Event' + + EventDataWrapper: + type: object + properties: + code: + type: integer + description: The HTTP status code of the returned result. + format: int32 + status: + type: string + description: A string description of the call status. + copyright: + type: string + description: The copyright notice for the returned result. + attributionText: + type: string + description: The attribution notice for this result. Please display either + this notice or the contents of the attributionHTML field on all screens + which contain data from the Marvel Comics API. + attributionHTML: + type: string + description: An HTML representation of the attribution notice for this result. Please + display either this notice or the contents of the attributionText field + on all screens which contain data from the Marvel Comics API. + data: + $ref: '#/components/schemas/EventDataContainer' + etag: + type: string + description: A digest value of the content returned by the call. + + Event: + type: object + properties: + id: + type: integer + description: The unique ID of the event resource. + format: int32 + title: + type: string + description: The title of the event. + description: + type: string + description: A description of the event. + resourceURI: + type: string + description: The canonical URL identifier for this resource. + urls: + type: array + description: A set of public web site URLs for the event. + items: + $ref: '#/components/schemas/Url' + modified: + type: string + description: The date the resource was most recently modified. + format: date + start: + type: string + description: The date of publication of the first issue in this event. + format: date + end: + type: string + description: The date of publication of the last issue in this event. + format: date + + \ No newline at end of file diff --git a/tests/integration/extracted/test_marvel_cases.py b/tests/integration/extracted/test_marvel_cases.py new file mode 100644 index 0000000..61ec312 --- /dev/null +++ b/tests/integration/extracted/test_marvel_cases.py @@ -0,0 +1,29 @@ +# +# Test different iterations of dotastats spec, this is FastAPI generated +# +from tests.integration.utils import get_dict_by_case + + +def test_marvel() -> None: + source = get_dict_by_case("extracted", "marvel_with_pagination_and_json_path.yml") + assert len(source["resources"]) == 1 + + assert source["client"]["paginator"] == { + "limit": 20, + "limit_param": "limit", + "offset_param": "offset", + "total_path": "data.total", + "type": "offset", + } + + assert source["resources"][0] == { + "name": "event", + "table_name": "event", + "primary_key": "id", + "write_disposition": "merge", + "endpoint": { + "params": {"characterId": "FILL_ME_IN"}, + "data_selector": "data.results", + "path": "/v1/public/characters/{characterId}/events", + }, + } From 68f4d9a2bd416cdc9121b832aede34ffc1a78d36 Mon Sep 17 00:00:00 2001 From: Dave Date: Thu, 23 May 2024 16:35:33 +0200 Subject: [PATCH 08/14] add marvel full spec --- tests/cases/original_specs/marvel.yml | 5368 +++++++++++++++++++++++++ 1 file changed, 5368 insertions(+) create mode 100644 tests/cases/original_specs/marvel.yml diff --git a/tests/cases/original_specs/marvel.yml b/tests/cases/original_specs/marvel.yml new file mode 100644 index 0000000..1137327 --- /dev/null +++ b/tests/cases/original_specs/marvel.yml @@ -0,0 +1,5368 @@ +openapi: 3.0.1 +info: + title: gateway.marvel.com + version: Cable +servers: +- url: http://gateway.marvel.com/ +tags: +- name: public +paths: + /v1/public/characters: + get: + tags: + - public + summary: Fetches lists of characters. + description: Fetches lists of comic characters with optional filters. See notes + on individual parameters below. + operationId: getCharacterCollection + parameters: + - name: name + in: query + description: Return only characters matching the specified full character + name (e.g. Spider-Man). + schema: + type: string + - name: nameStartsWith + in: query + description: Return characters with names that begin with the specified string + (e.g. Sp). + schema: + type: string + - name: modifiedSince + in: query + description: Return only characters which have been modified since the specified + date. + schema: + type: string + format: date + - name: comics + in: query + description: Return only characters which appear in the specified comics (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: series + in: query + description: Return only characters which appear the specified series (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: events + in: query + description: Return only characters which appear in the specified events (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: stories + in: query + description: Return only characters which appear the specified stories (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/CharacterDataWrapper' + /v1/public/characters/{characterId}: + get: + tags: + - public + summary: Fetches a single character by id. + description: This method fetches a single character resource. It is the canonical + URI for any character resource provided by the API. + operationId: getCharacterIndividual + parameters: + - name: characterId + in: path + description: A single character id. + required: true + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/CharacterDataWrapper' + /v1/public/characters/{characterId}/comics: + get: + tags: + - public + summary: Fetches lists of comics filtered by a character id. + description: Fetches lists of comics containing a specific character, with optional + filters. See notes on individual parameters below. + operationId: getComicsCharacterCollection + parameters: + - name: characterId + in: path + description: The character id. + required: true + schema: + type: integer + format: int32 + - name: format + in: query + description: Filter by the issue format (e.g. comic, digital comic, hardcover). + schema: + type: string + - name: formatType + in: query + description: Filter by the issue format type (comic or collection). + schema: + type: string + - name: noVariants + in: query + description: Exclude variant comics from the result set. + schema: + type: boolean + - name: dateDescriptor + in: query + description: Return comics within a predefined date range. + schema: + type: string + - name: dateRange + in: query + description: Return comics within a predefined date range. Dates must be + specified as date1,date2 (e.g. 2013-01-01,2013-01-02). Dates are preferably + formatted as YYYY-MM-DD but may be sent as any common date format. + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: title + in: query + description: Return only issues in series whose title matches the input. + schema: + type: string + - name: titleStartsWith + in: query + description: Return only issues in series whose title starts with the input. + schema: + type: string + - name: startYear + in: query + description: Return only issues in series whose start year matches the input. + schema: + type: integer + format: int32 + - name: issueNumber + in: query + description: Return only issues in series whose issue number matches the input. + schema: + type: integer + format: int32 + - name: diamondCode + in: query + description: Filter by diamond code. + schema: + type: string + - name: digitalId + in: query + description: Filter by digital comic id. + schema: + type: integer + format: int32 + - name: upc + in: query + description: Filter by UPC. + schema: + type: string + - name: isbn + in: query + description: Filter by ISBN. + schema: + type: string + - name: ean + in: query + description: Filter by EAN. + schema: + type: string + - name: issn + in: query + description: Filter by ISSN. + schema: + type: string + - name: hasDigitalIssue + in: query + description: Include only results which are available digitally. + schema: + type: boolean + - name: modifiedSince + in: query + description: Return only comics which have been modified since the specified + date. + schema: + type: string + format: date + - name: creators + in: query + description: Return only comics which feature work by the specified creators + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: series + in: query + description: Return only comics which are part of the specified series (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: events + in: query + description: Return only comics which take place in the specified events (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: stories + in: query + description: Return only comics which contain the specified stories (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: sharedAppearances + in: query + description: Return only comics in which the specified characters appear together + (for example in which BOTH Spider-Man and Wolverine appear). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: collaborators + in: query + description: Return only comics in which the specified creators worked together + (for example in which BOTH Stan Lee and Jack Kirby did work). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/ComicDataWrapper' + /v1/public/characters/{characterId}/events: + get: + tags: + - public + summary: Fetches lists of events filtered by a character id. + description: Fetches lists of events in which a specific character appears, + with optional filters. See notes on individual parameters below. + operationId: getCharacterEventsCollection + parameters: + - name: characterId + in: path + description: The character ID. + required: true + schema: + type: integer + format: int32 + - name: name + in: query + description: Filter the event list by name. + schema: + type: string + - name: nameStartsWith + in: query + description: Return events with names that begin with the specified string + (e.g. Sp). + schema: + type: string + - name: modifiedSince + in: query + description: Return only events which have been modified since the specified + date. + schema: + type: string + format: date + - name: creators + in: query + description: Return only events which feature work by the specified creators + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: series + in: query + description: Return only events which are part of the specified series (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: comics + in: query + description: Return only events which take place in the specified comics (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: stories + in: query + description: Return only events which contain the specified stories (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/EventDataWrapper' + /v1/public/characters/{characterId}/series: + get: + tags: + - public + summary: Fetches lists of series filtered by a character id. + description: Fetches lists of comic series in which a specific character appears, + with optional filters. See notes on individual parameters below. + operationId: getCharacterSeriesCollection + parameters: + - name: characterId + in: path + description: The character ID + required: true + schema: + type: integer + format: int32 + - name: title + in: query + description: Filter by series title. + schema: + type: string + - name: titleStartsWith + in: query + description: Return series with titles that begin with the specified string + (e.g. Sp). + schema: + type: string + - name: startYear + in: query + description: Return only series matching the specified start year. + schema: + type: integer + format: int32 + - name: modifiedSince + in: query + description: Return only series which have been modified since the specified + date. + schema: + type: string + format: date + - name: comics + in: query + description: Return only series which contain the specified comics (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: stories + in: query + description: Return only series which contain the specified stories (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: events + in: query + description: Return only series which have comics that take place during the + specified events (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: creators + in: query + description: Return only series which feature work by the specified creators + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: seriesType + in: query + description: Filter the series by publication frequency type. + schema: + type: string + - name: contains + in: query + description: Return only series containing one or more comics with the specified + format. + style: form + explode: false + schema: + type: array + items: + type: string + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/SeriesDataWrapper' + /v1/public/characters/{characterId}/stories: + get: + tags: + - public + summary: Fetches lists of stories filtered by a character id. + description: Fetches lists of comic stories featuring a specific character + with optional filters. See notes on individual parameters below. + operationId: getCharacterStoryCollection + parameters: + - name: characterId + in: path + description: The character ID. + required: true + schema: + type: integer + format: int32 + - name: modifiedSince + in: query + description: Return only stories which have been modified since the specified + date. + schema: + type: string + format: date + - name: comics + in: query + description: Return only stories contained in the specified (accepts a comma-separated + list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: series + in: query + description: Return only stories contained the specified series (accepts a + comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: events + in: query + description: Return only stories which take place during the specified events + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: creators + in: query + description: Return only stories which feature work by the specified creators + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/StoryDataWrapper' + /v1/public/comics: + get: + tags: + - public + summary: Fetches lists of comics. + description: Fetches lists of comics with optional filters. See notes on individual + parameters below. + operationId: getComicsCollection + parameters: + - name: format + in: query + description: Filter by the issue format (e.g. comic, digital comic, hardcover). + schema: + type: string + - name: formatType + in: query + description: Filter by the issue format type (comic or collection). + schema: + type: string + - name: noVariants + in: query + description: Exclude variants (alternate covers, secondary printings, director's + cuts, etc.) from the result set. + schema: + type: boolean + - name: dateDescriptor + in: query + description: Return comics within a predefined date range. + schema: + type: string + - name: dateRange + in: query + description: Return comics within a predefined date range. Dates must be + specified as date1,date2 (e.g. 2013-01-01,2013-01-02). Dates are preferably + formatted as YYYY-MM-DD but may be sent as any common date format. + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: title + in: query + description: Return only issues in series whose title matches the input. + schema: + type: string + - name: titleStartsWith + in: query + description: Return only issues in series whose title starts with the input. + schema: + type: string + - name: startYear + in: query + description: Return only issues in series whose start year matches the input. + schema: + type: integer + format: int32 + - name: issueNumber + in: query + description: Return only issues in series whose issue number matches the input. + schema: + type: integer + format: int32 + - name: diamondCode + in: query + description: Filter by diamond code. + schema: + type: string + - name: digitalId + in: query + description: Filter by digital comic id. + schema: + type: integer + format: int32 + - name: upc + in: query + description: Filter by UPC. + schema: + type: string + - name: isbn + in: query + description: Filter by ISBN. + schema: + type: string + - name: ean + in: query + description: Filter by EAN. + schema: + type: string + - name: issn + in: query + description: Filter by ISSN. + schema: + type: string + - name: hasDigitalIssue + in: query + description: Include only results which are available digitally. + schema: + type: boolean + - name: modifiedSince + in: query + description: Return only comics which have been modified since the specified + date. + schema: + type: string + format: date + - name: creators + in: query + description: Return only comics which feature work by the specified creators + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: characters + in: query + description: Return only comics which feature the specified characters (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: series + in: query + description: Return only comics which are part of the specified series (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: events + in: query + description: Return only comics which take place in the specified events (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: stories + in: query + description: Return only comics which contain the specified stories (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: sharedAppearances + in: query + description: Return only comics in which the specified characters appear together + (for example in which BOTH Spider-Man and Wolverine appear). Accepts a comma-separated + list of ids. + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: collaborators + in: query + description: Return only comics in which the specified creators worked together + (for example in which BOTH Stan Lee and Jack Kirby did work). Accepts a + comma-separated list of ids. + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/ComicDataWrapper' + /v1/public/comics/{comicId}: + get: + tags: + - public + summary: Fetches a single comic by id. + description: This method fetches a single comic resource. It is the canonical + URI for any comic resource provided by the API. + operationId: getComicIndividual + parameters: + - name: comicId + in: path + description: A single comic. + required: true + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/ComicDataWrapper' + /v1/public/comics/{comicId}/characters: + get: + tags: + - public + summary: Fetches lists of characters filtered by a comic id. + description: Fetches lists of characters which appear in a specific comic with + optional filters. See notes on individual parameters below. + operationId: getComicCharacterCollection + parameters: + - name: comicId + in: path + description: The comic id. + required: true + schema: + type: integer + format: int32 + - name: name + in: query + description: Return only characters matching the specified full character + name (e.g. Spider-Man). + schema: + type: string + - name: nameStartsWith + in: query + description: Return characters with names that begin with the specified string + (e.g. Sp). + schema: + type: string + - name: modifiedSince + in: query + description: Return only characters which have been modified since the specified + date. + schema: + type: string + format: date + - name: series + in: query + description: Return only characters which appear the specified series (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: events + in: query + description: Return only characters which appear comics that took place in + the specified events (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: stories + in: query + description: Return only characters which appear the specified stories (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/CharacterDataWrapper' + /v1/public/comics/{comicId}/creators: + get: + tags: + - public + summary: Fetches lists of creators filtered by a comic id. + description: Fetches lists of comic creators whose work appears in a specific + comic, with optional filters. See notes on individual parameters below. + operationId: getCreatorByComicIdCollection + parameters: + - name: comicId + in: path + description: The comic id. + required: true + schema: + type: integer + format: int32 + - name: firstName + in: query + description: Filter by creator first name (e.g. brian). + schema: + type: string + - name: middleName + in: query + description: Filter by creator middle name (e.g. Michael). + schema: + type: string + - name: lastName + in: query + description: Filter by creator last name (e.g. Bendis). + schema: + type: string + - name: suffix + in: query + description: Filter by suffix or honorific (e.g. Jr., Sr.). + schema: + type: string + - name: nameStartsWith + in: query + description: Filter by creator names that match critera (e.g. B, St L). + schema: + type: string + - name: firstNameStartsWith + in: query + description: Filter by creator first names that match critera (e.g. B, St + L). + schema: + type: string + - name: middleNameStartsWith + in: query + description: Filter by creator middle names that match critera (e.g. Mi). + schema: + type: string + - name: lastNameStartsWith + in: query + description: Filter by creator last names that match critera (e.g. Ben). + schema: + type: string + - name: modifiedSince + in: query + description: Return only creators which have been modified since the specified + date. + schema: + type: string + format: date + - name: comics + in: query + description: Return only creators who worked on in the specified comics (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: series + in: query + description: Return only creators who worked on the specified series (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: stories + in: query + description: Return only creators who worked on the specified stories (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/CreatorDataWrapper' + /v1/public/comics/{comicId}/events: + get: + tags: + - public + summary: Fetches lists of events filtered by a comic id. + description: Fetches lists of events in which a specific comic appears, with + optional filters. See notes on individual parameters below. + operationId: getIssueEventsCollection + parameters: + - name: comicId + in: path + description: The comic ID. + required: true + schema: + type: integer + format: int32 + - name: name + in: query + description: Filter the event list by name. + schema: + type: string + - name: nameStartsWith + in: query + description: Return events with names that begin with the specified string + (e.g. Sp). + schema: + type: string + - name: modifiedSince + in: query + description: Return only events which have been modified since the specified + date. + schema: + type: string + format: date + - name: creators + in: query + description: Return only events which feature work by the specified creators + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: characters + in: query + description: Return only events which feature the specified characters (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: series + in: query + description: Return only events which are part of the specified series (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: stories + in: query + description: Return only events which contain the specified stories (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/EventDataWrapper' + /v1/public/comics/{comicId}/stories: + get: + tags: + - public + summary: Fetches lists of stories filtered by a comic id. + description: Fetches lists of comic stories in a specific comic issue, with + optional filters. See notes on individual parameters below. + operationId: getComicStoryCollection + parameters: + - name: comicId + in: path + description: The comic ID. + required: true + schema: + type: integer + format: int32 + - name: modifiedSince + in: query + description: Return only stories which have been modified since the specified + date. + schema: + type: string + format: date + - name: series + in: query + description: Return only stories contained the specified series (accepts a + comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: events + in: query + description: Return only stories which take place during the specified events + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: creators + in: query + description: Return only stories which feature work by the specified creators + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: characters + in: query + description: Return only stories which feature the specified characters (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/StoryDataWrapper' + /v1/public/creators: + get: + tags: + - public + summary: Fetches lists of creators. + description: Fetches lists of comic creators with optional filters. See notes + on individual parameters below. + operationId: getCreatorCollection + parameters: + - name: firstName + in: query + description: Filter by creator first name (e.g. Brian). + schema: + type: string + - name: middleName + in: query + description: Filter by creator middle name (e.g. Michael). + schema: + type: string + - name: lastName + in: query + description: Filter by creator last name (e.g. Bendis). + schema: + type: string + - name: suffix + in: query + description: Filter by suffix or honorific (e.g. Jr., Sr.). + schema: + type: string + - name: nameStartsWith + in: query + description: Filter by creator names that match critera (e.g. B, St L). + schema: + type: string + - name: firstNameStartsWith + in: query + description: Filter by creator first names that match critera (e.g. B, St + L). + schema: + type: string + - name: middleNameStartsWith + in: query + description: Filter by creator middle names that match critera (e.g. Mi). + schema: + type: string + - name: lastNameStartsWith + in: query + description: Filter by creator last names that match critera (e.g. Ben). + schema: + type: string + - name: modifiedSince + in: query + description: Return only creators which have been modified since the specified + date. + schema: + type: string + format: date + - name: comics + in: query + description: Return only creators who worked on in the specified comics (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: series + in: query + description: Return only creators who worked on the specified series (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: events + in: query + description: Return only creators who worked on comics that took place in + the specified events (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: stories + in: query + description: Return only creators who worked on the specified stories (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/CreatorDataWrapper' + /v1/public/creators/{creatorId}: + get: + tags: + - public + summary: Fetches a single creator by id. + description: This method fetches a single creator resource. It is the canonical + URI for any creator resource provided by the API. + operationId: getCreatorIndividual + parameters: + - name: creatorId + in: path + description: A single creator id. + required: true + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/CreatorDataWrapper' + /v1/public/creators/{creatorId}/comics: + get: + tags: + - public + summary: Fetches lists of comics filtered by a creator id. + description: Fetches lists of comics in which the work of a specific creator + appears, with optional filters. See notes on individual parameters below. + operationId: getComicsByCreatorIdCollection + parameters: + - name: creatorId + in: path + description: The creator ID. + required: true + schema: + type: integer + format: int32 + - name: format + in: query + description: Filter by the issue format (e.g. comic, digital comic, hardcover). + schema: + type: string + - name: formatType + in: query + description: Filter by the issue format type (comic or collection). + schema: + type: string + - name: noVariants + in: query + description: Exclude variant comics from the result set. + schema: + type: boolean + - name: dateDescriptor + in: query + description: Return comics within a predefined date range. + schema: + type: string + - name: dateRange + in: query + description: Return comics within a predefined date range. Dates must be + specified as date1,date2 (e.g. 2013-01-01,2013-01-02). Dates are preferably + formatted as YYYY-MM-DD but may be sent as any common date format. + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: title + in: query + description: Return only issues in series whose title matches the input. + schema: + type: string + - name: titleStartsWith + in: query + description: Return only issues in series whose title starts with the input. + schema: + type: string + - name: startYear + in: query + description: Return only issues in series whose start year matches the input. + schema: + type: integer + format: int32 + - name: issueNumber + in: query + description: Return only issues in series whose issue number matches the input. + schema: + type: integer + format: int32 + - name: diamondCode + in: query + description: Filter by diamond code. + schema: + type: string + - name: digitalId + in: query + description: Filter by digital comic id. + schema: + type: integer + format: int32 + - name: upc + in: query + description: Filter by UPC. + schema: + type: string + - name: isbn + in: query + description: Filter by ISBN. + schema: + type: string + - name: ean + in: query + description: Filter by EAN. + schema: + type: string + - name: issn + in: query + description: Filter by ISSN. + schema: + type: string + - name: hasDigitalIssue + in: query + description: Include only results which are available digitally. + style: form + explode: false + schema: + type: array + items: + type: boolean + - name: modifiedSince + in: query + description: Return only comics which have been modified since the specified + date. + schema: + type: string + format: date + - name: characters + in: query + description: Return only comics which feature the specified characters (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: series + in: query + description: Return only comics which are part of the specified series (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: events + in: query + description: Return only comics which take place in the specified events (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: stories + in: query + description: Return only comics which contain the specified stories (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: sharedAppearances + in: query + description: Return only comics in which the specified characters appear together + (for example in which BOTH Spider-Man and Wolverine appear). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: collaborators + in: query + description: Return only comics in which the specified creators worked together + (for example in which BOTH Stan Lee and Jack Kirby did work). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/ComicDataWrapper' + /v1/public/creators/{creatorId}/events: + get: + tags: + - public + summary: Fetches lists of events filtered by a creator id. + description: Fetches lists of events featuring the work of a specific creator + with optional filters. See notes on individual parameters below. + operationId: getCreatorEventsCollection + parameters: + - name: creatorId + in: path + description: The creator ID. + required: true + schema: + type: integer + format: int32 + - name: name + in: query + description: Filter the event list by name. + schema: + type: string + - name: nameStartsWith + in: query + description: Return events with names that begin with the specified string + (e.g. Sp). + schema: + type: string + - name: modifiedSince + in: query + description: Return only events which have been modified since the specified + date. + schema: + type: string + format: date + - name: characters + in: query + description: Return only events which feature the specified characters (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: series + in: query + description: Return only events which are part of the specified series (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: comics + in: query + description: Return only events which take place in the specified comics (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: stories + in: query + description: Return only events which contain the specified stories (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/EventDataWrapper' + /v1/public/creators/{creatorId}/series: + get: + tags: + - public + summary: Fetches lists of series filtered by a creator id. + description: Fetches lists of comic series in which a specific creator's work + appears, with optional filters. See notes on individual parameters below. + operationId: getCreatorSeriesCollection + parameters: + - name: creatorId + in: path + description: The creator ID. + required: true + schema: + type: integer + format: int32 + - name: title + in: query + description: Filter by series title. + schema: + type: string + - name: titleStartsWith + in: query + description: Return series with titles that begin with the specified string + (e.g. Sp). + schema: + type: string + - name: startYear + in: query + description: Return only series matching the specified start year. + schema: + type: integer + format: int32 + - name: modifiedSince + in: query + description: Return only series which have been modified since the specified + date. + schema: + type: string + format: date + - name: comics + in: query + description: Return only series which contain the specified comics (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: stories + in: query + description: Return only series which contain the specified stories (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: events + in: query + description: Return only series which have comics that take place during the + specified events (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: characters + in: query + description: Return only series which feature the specified characters (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: seriesType + in: query + description: Filter the series by publication frequency type. + schema: + type: string + - name: contains + in: query + description: Return only series containing one or more comics with the specified + format. + style: form + explode: false + schema: + type: array + items: + type: string + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/SeriesDataWrapper' + /v1/public/creators/{creatorId}/stories: + get: + tags: + - public + summary: Fetches lists of stories filtered by a creator id. + description: Fetches lists of comic stories by a specific creator with optional + filters. See notes on individual parameters below. + operationId: getCreatorStoryCollection + parameters: + - name: creatorId + in: path + description: The ID of the creator. + required: true + schema: + type: integer + format: int32 + - name: modifiedSince + in: query + description: Return only stories which have been modified since the specified + date. + schema: + type: string + format: date + - name: comics + in: query + description: Return only stories contained in the specified comics (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: series + in: query + description: Return only stories contained the specified series (accepts a + comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: events + in: query + description: Return only stories which take place during the specified events + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: characters + in: query + description: Return only stories which feature the specified characters (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/StoryDataWrapper' + /v1/public/events: + get: + tags: + - public + summary: Fetches lists of events. + description: Fetches lists of events with optional filters. See notes on individual + parameters below. + operationId: getEventsCollection + parameters: + - name: name + in: query + description: Return only events which match the specified name. + schema: + type: string + - name: nameStartsWith + in: query + description: Return events with names that begin with the specified string + (e.g. Sp). + schema: + type: string + - name: modifiedSince + in: query + description: Return only events which have been modified since the specified + date. + schema: + type: string + format: date + - name: creators + in: query + description: Return only events which feature work by the specified creators + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: characters + in: query + description: Return only events which feature the specified characters (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: series + in: query + description: Return only events which are part of the specified series (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: comics + in: query + description: Return only events which take place in the specified comics (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: stories + in: query + description: Return only events which take place in the specified stories + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/EventDataWrapper' + /v1/public/events/{eventId}: + get: + tags: + - public + summary: Fetches a single event by id. + description: This method fetches a single event resource. It is the canonical + URI for any event resource provided by the API. + operationId: getEventIndividual + parameters: + - name: eventId + in: path + description: A single event. + required: true + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/EventDataWrapper' + /v1/public/events/{eventId}/characters: + get: + tags: + - public + summary: Fetches lists of characters filtered by an event id. + description: Fetches lists of characters which appear in a specific event, with + optional filters. See notes on individual parameters below. + operationId: getEventCharacterCollection + parameters: + - name: eventId + in: path + description: The event ID + required: true + schema: + type: integer + format: int32 + - name: name + in: query + description: Return only characters matching the specified full character + name (e.g. Spider-Man). + schema: + type: string + - name: nameStartsWith + in: query + description: Return characters with names that begin with the specified string + (e.g. Sp). + schema: + type: string + - name: modifiedSince + in: query + description: Return only characters which have been modified since the specified + date. + schema: + type: string + format: date + - name: comics + in: query + description: Return only characters which appear in the specified comics (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: series + in: query + description: Return only characters which appear the specified series (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: stories + in: query + description: Return only characters which appear the specified stories (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/CharacterDataWrapper' + /v1/public/events/{eventId}/comics: + get: + tags: + - public + summary: Fetches lists of comics filtered by an event id. + description: Fetches lists of comics which take place during a specific event, + with optional filters. See notes on individual parameters below. + operationId: getComics ByEventIdCollection + parameters: + - name: eventId + in: path + description: The event id. + required: true + schema: + type: integer + format: int32 + - name: format + in: query + description: Filter by the issue format (e.g. comic, digital comic, hardcover). + schema: + type: string + - name: formatType + in: query + description: Filter by the issue format type (comic or collection). + schema: + type: string + - name: noVariants + in: query + description: Exclude variant comics from the result set. + style: form + explode: false + schema: + type: array + items: + type: boolean + - name: dateDescriptor + in: query + description: Return comics within a predefined date range. + style: form + explode: false + schema: + type: array + items: + type: string + - name: dateRange + in: query + description: Return comics within a predefined date range. Dates must be + specified as date1,date2 (e.g. 2013-01-01,2013-01-02). Dates are preferably + formatted as YYYY-MM-DD but may be sent as any common date format. + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: title + in: query + description: Return only issues in series whose title matches the input. + schema: + type: string + - name: titleStartsWith + in: query + description: Return only issues in series whose title starts with the input. + schema: + type: string + - name: startYear + in: query + description: Return only issues in series whose start year matches the input. + schema: + type: integer + format: int32 + - name: issueNumber + in: query + description: Return only issues in series whose issue number matches the input. + schema: + type: integer + format: int32 + - name: diamondCode + in: query + description: Filter by diamond code. + schema: + type: string + - name: digitalId + in: query + description: Filter by digital comic id. + schema: + type: integer + format: int32 + - name: upc + in: query + description: Filter by UPC. + schema: + type: string + - name: isbn + in: query + description: Filter by ISBN. + schema: + type: string + - name: ean + in: query + description: Filter by EAN. + schema: + type: string + - name: issn + in: query + description: Filter by ISSN. + schema: + type: string + - name: hasDigitalIssue + in: query + description: Include only results which are available digitally. + style: form + explode: false + schema: + type: array + items: + type: boolean + - name: modifiedSince + in: query + description: Return only comics which have been modified since the specified + date. + schema: + type: string + format: date + - name: creators + in: query + description: Return only comics which feature work by the specified creators + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: characters + in: query + description: Return only comics which feature the specified characters (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: series + in: query + description: Return only comics which are part of the specified series (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: events + in: query + description: Return only comics which take place in the specified events (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: stories + in: query + description: Return only comics which contain the specified stories (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: sharedAppearances + in: query + description: Return only comics in which the specified characters appear together + (for example in which BOTH Spider-Man and Wolverine appear). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: collaborators + in: query + description: Return only comics in which the specified creators worked together + (for example in which BOTH Stan Lee and Jack Kirby did work). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/ComicDataWrapper' + /v1/public/events/{eventId}/creators: + get: + tags: + - public + summary: Fetches lists of creators filtered by an event id. + description: Fetches lists of comic creators whose work appears in a specific + event, with optional filters. See notes on individual parameters below. + operationId: getCreatorByEventIdCollection + parameters: + - name: eventId + in: path + description: The event ID. + required: true + schema: + type: integer + format: int32 + - name: firstName + in: query + description: Filter by creator first name (e.g. brian). + schema: + type: string + - name: middleName + in: query + description: Filter by creator middle name (e.g. Michael). + schema: + type: string + - name: lastName + in: query + description: Filter by creator last name (e.g. Bendis). + schema: + type: string + - name: suffix + in: query + description: Filter by suffix or honorific (e.g. Jr., Sr.). + schema: + type: string + - name: nameStartsWith + in: query + description: Filter by creator names that match critera (e.g. B, St L). + schema: + type: string + - name: firstNameStartsWith + in: query + description: Filter by creator first names that match critera (e.g. B, St + L). + schema: + type: string + - name: middleNameStartsWith + in: query + description: Filter by creator middle names that match critera (e.g. Mi). + schema: + type: string + - name: lastNameStartsWith + in: query + description: Filter by creator last names that match critera (e.g. Ben). + schema: + type: string + - name: modifiedSince + in: query + description: Return only creators which have been modified since the specified + date. + schema: + type: string + format: date + - name: comics + in: query + description: Return only creators who worked on in the specified comics (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: series + in: query + description: Return only creators who worked on the specified series (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: stories + in: query + description: Return only creators who worked on the specified stories (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/CreatorDataWrapper' + /v1/public/events/{eventId}/series: + get: + tags: + - public + summary: Fetches lists of series filtered by an event id. + description: Fetches lists of comic series in which a specific event takes place, + with optional filters. See notes on individual parameters below. + operationId: getEventSeriesCollection + parameters: + - name: eventId + in: path + description: The event ID. + required: true + schema: + type: integer + format: int32 + - name: title + in: query + description: Filter by series title. + schema: + type: string + - name: titleStartsWith + in: query + description: Return series with titles that begin with the specified string + (e.g. Sp). + schema: + type: string + - name: startYear + in: query + description: Return only series matching the specified start year. + schema: + type: integer + format: int32 + - name: modifiedSince + in: query + description: Return only series which have been modified since the specified + date. + schema: + type: string + format: date + - name: comics + in: query + description: Return only series which contain the specified comics (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: stories + in: query + description: Return only series which contain the specified stories (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: creators + in: query + description: Return only series which feature work by the specified creators + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: characters + in: query + description: Return only series which feature the specified characters (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: seriesType + in: query + description: Filter the series by publication frequency type. + schema: + type: string + - name: contains + in: query + description: Return only series containing one or more comics with the specified + format. + style: form + explode: false + schema: + type: array + items: + type: string + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/SeriesDataWrapper' + /v1/public/events/{eventId}/stories: + get: + tags: + - public + summary: Fetches lists of stories filtered by an event id. + description: Fetches lists of comic stories from a specific event, with optional + filters. See notes on individual parameters below. + operationId: getEventStoryCollection + parameters: + - name: eventId + in: path + description: The ID of the event. + required: true + schema: + type: integer + format: int32 + - name: modifiedSince + in: query + description: Return only stories which have been modified since the specified + date. + schema: + type: string + format: date + - name: comics + in: query + description: Return only stories contained in the specified (accepts a comma-separated + list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: series + in: query + description: Return only stories contained the specified series (accepts a + comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: creators + in: query + description: Return only stories which feature work by the specified creators + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: characters + in: query + description: Return only stories which feature the specified characters (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/StoryDataWrapper' + /v1/public/series: + get: + tags: + - public + summary: Fetches lists of series. + description: Fetches lists of comic series with optional filters. See notes + on individual parameters below. + operationId: getSeriesCollection + parameters: + - name: title + in: query + description: Return only series matching the specified title. + schema: + type: string + - name: titleStartsWith + in: query + description: Return series with titles that begin with the specified string + (e.g. Sp). + schema: + type: string + - name: startYear + in: query + description: Return only series matching the specified start year. + schema: + type: integer + format: int32 + - name: modifiedSince + in: query + description: Return only series which have been modified since the specified + date. + schema: + type: string + format: date + - name: comics + in: query + description: Return only series which contain the specified comics (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: stories + in: query + description: Return only series which contain the specified stories (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: events + in: query + description: Return only series which have comics that take place during the + specified events (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: creators + in: query + description: Return only series which feature work by the specified creators + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: characters + in: query + description: Return only series which feature the specified characters (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: seriesType + in: query + description: Filter the series by publication frequency type. + schema: + type: string + - name: contains + in: query + description: Return only series containing one or more comics with the specified + format. + style: form + explode: false + schema: + type: array + items: + type: string + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/SeriesDataWrapper' + /v1/public/series/{seriesId}: + get: + tags: + - public + summary: Fetches a single comic series by id. + description: This method fetches a single comic series resource. It is the + canonical URI for any comic series resource provided by the API. + operationId: getSeriesIndividual + parameters: + - name: seriesId + in: path + description: Filter by series title. + required: true + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/SeriesDataWrapper' + /v1/public/series/{seriesId}/characters: + get: + tags: + - public + summary: Fetches lists of characters filtered by a series id. + description: Fetches lists of characters which appear in specific series, with + optional filters. See notes on individual parameters below. + operationId: getSeriesCharacterWrapper + parameters: + - name: seriesId + in: path + description: The series id. + required: true + schema: + type: integer + format: int32 + - name: name + in: query + description: Return only characters matching the specified full character + name (e.g. Spider-Man). + schema: + type: string + - name: nameStartsWith + in: query + description: Return characters with names that begin with the specified string + (e.g. Sp). + schema: + type: string + - name: modifiedSince + in: query + description: Return only characters which have been modified since the specified + date. + schema: + type: string + format: date + - name: comics + in: query + description: Return only characters which appear in the specified comics (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: events + in: query + description: Return only characters which appear comics that took place in + the specified events (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: stories + in: query + description: Return only characters which appear the specified stories (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/CharacterDataWrapper' + /v1/public/series/{seriesId}/comics: + get: + tags: + - public + summary: Fetches lists of comics filtered by a series id. + description: Fetches lists of comics which are published as part of a specific + series, with optional filters. See notes on individual parameters below. + operationId: getComicsBySeriesIdCollection + parameters: + - name: seriesId + in: path + description: The series ID. + required: true + schema: + type: integer + format: int32 + - name: format + in: query + description: Filter by the issue format (e.g. comic, digital comic, hardcover). + schema: + type: string + - name: formatType + in: query + description: Filter by the issue format type (comic or collection). + schema: + type: string + - name: noVariants + in: query + description: Exclude variant comics from the result set. + style: form + explode: false + schema: + type: array + items: + type: boolean + - name: dateDescriptor + in: query + description: Return comics within a predefined date range. + style: form + explode: false + schema: + type: array + items: + type: string + - name: dateRange + in: query + description: Return comics within a predefined date range. Dates must be + specified as date1,date2 (e.g. 2013-01-01,2013-01-02). Dates are preferably + formatted as YYYY-MM-DD but may be sent as any common date format. + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: title + in: query + description: Return only issues in series whose title matches the input. + schema: + type: string + - name: titleStartsWith + in: query + description: Return only issues in series whose title starts with the input. + schema: + type: string + - name: startYear + in: query + description: Return only issues in series whose start year matches the input. + schema: + type: integer + format: int32 + - name: issueNumber + in: query + description: Return only issues in series whose issue number matches the input. + schema: + type: integer + format: int32 + - name: diamondCode + in: query + description: Filter by diamond code. + schema: + type: string + - name: digitalId + in: query + description: Filter by digital comic id. + schema: + type: integer + format: int32 + - name: upc + in: query + description: Filter by UPC. + schema: + type: string + - name: isbn + in: query + description: Filter by ISBN. + schema: + type: string + - name: ean + in: query + description: Filter by EAN. + schema: + type: string + - name: issn + in: query + description: Filter by ISSN. + schema: + type: string + - name: hasDigitalIssue + in: query + description: Include only results which are available digitally. + style: form + explode: false + schema: + type: array + items: + type: boolean + - name: modifiedSince + in: query + description: Return only comics which have been modified since the specified + date. + schema: + type: string + format: date + - name: creators + in: query + description: Return only comics which feature work by the specified creators + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: characters + in: query + description: Return only comics which feature the specified characters (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: events + in: query + description: Return only comics which take place in the specified events (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: stories + in: query + description: Return only comics which contain the specified stories (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: sharedAppearances + in: query + description: Return only comics in which the specified characters appear together + (for example in which BOTH Spider-Man and Wolverine appear). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: collaborators + in: query + description: Return only comics in which the specified creators worked together + (for example in which BOTH Stan Lee and Jack Kirby did work). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/ComicDataWrapper' + /v1/public/series/{seriesId}/creators: + get: + tags: + - public + summary: Fetches lists of creators filtered by a series id. + description: Fetches lists of comic creators whose work appears in a specific + series, with optional filters. See notes on individual parameters below. + operationId: getCreatorBySeriesIdCollection + parameters: + - name: seriesId + in: path + description: The series ID. + required: true + schema: + type: integer + format: int32 + - name: firstName + in: query + description: Filter by creator first name (e.g. brian). + schema: + type: string + - name: middleName + in: query + description: Filter by creator middle name (e.g. Michael). + schema: + type: string + - name: lastName + in: query + description: Filter by creator last name (e.g. Bendis). + schema: + type: string + - name: suffix + in: query + description: Filter by suffix or honorific (e.g. Jr., Sr.). + schema: + type: string + - name: nameStartsWith + in: query + description: Filter by creator names that match critera (e.g. B, St L). + schema: + type: string + - name: firstNameStartsWith + in: query + description: Filter by creator first names that match critera (e.g. B, St + L). + schema: + type: string + - name: middleNameStartsWith + in: query + description: Filter by creator middle names that match critera (e.g. Mi). + schema: + type: string + - name: lastNameStartsWith + in: query + description: Filter by creator last names that match critera (e.g. Ben). + schema: + type: string + - name: modifiedSince + in: query + description: Return only creators which have been modified since the specified + date. + schema: + type: string + format: date + - name: comics + in: query + description: Return only creators who worked on in the specified comics (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: events + in: query + description: Return only creators who worked on comics that took place in + the specified events (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: stories + in: query + description: Return only creators who worked on the specified stories (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/CreatorDataWrapper' + /v1/public/series/{seriesId}/events: + get: + tags: + - public + summary: Fetches lists of events filtered by a series id. + description: Fetches lists of events which occur in a specific series, with + optional filters. See notes on individual parameters below. + operationId: getEventsBySeriesIdCollection + parameters: + - name: seriesId + in: path + description: The series ID. + required: true + schema: + type: integer + format: int32 + - name: name + in: query + description: Filter the event list by name. + schema: + type: string + - name: nameStartsWith + in: query + description: Return events with names that begin with the specified string + (e.g. Sp). + schema: + type: string + - name: modifiedSince + in: query + description: Return only events which have been modified since the specified + date. + schema: + type: string + format: date + - name: creators + in: query + description: Return only events which feature work by the specified creators + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: characters + in: query + description: Return only events which feature the specified characters (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: comics + in: query + description: Return only events which take place in the specified comics (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: stories + in: query + description: Return only events which contain the specified stories (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/EventDataWrapper' + /v1/public/series/{seriesId}/stories: + get: + tags: + - public + summary: Fetches lists of stories filtered by a series id. + description: Fetches lists of comic stories from a specific series with optional + filters. See notes on individual parameters below. + operationId: getSeriesStoryCollection + parameters: + - name: seriesId + in: path + description: The series ID. + required: true + schema: + type: integer + format: int32 + - name: modifiedSince + in: query + description: Return only stories which have been modified since the specified + date. + schema: + type: string + format: date + - name: comics + in: query + description: Return only stories contained in the specified (accepts a comma-separated + list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: events + in: query + description: Return only stories which take place during the specified events + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: creators + in: query + description: Return only stories which feature work by the specified creators + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: characters + in: query + description: Return only stories which feature the specified characters (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/StoryDataWrapper' + /v1/public/stories: + get: + tags: + - public + summary: Fetches lists of stories. + description: Fetches lists of comic stories with optional filters. See notes + on individual parameters below. + operationId: getStoryCollection + parameters: + - name: modifiedSince + in: query + description: Return only stories which have been modified since the specified + date. + schema: + type: string + format: date + - name: comics + in: query + description: Return only stories contained in the specified (accepts a comma-separated + list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: series + in: query + description: Return only stories contained the specified series (accepts a + comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: events + in: query + description: Return only stories which take place during the specified events + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: creators + in: query + description: Return only stories which feature work by the specified creators + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: characters + in: query + description: Return only stories which feature the specified characters (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/StoryDataWrapper' + /v1/public/stories/{storyId}: + get: + tags: + - public + summary: Fetches a single comic story by id. + description: This method fetches a single comic story resource. It is the canonical + URI for any comic story resource provided by the API. + operationId: getStoryIndividual + parameters: + - name: storyId + in: path + description: Filter by story id. + required: true + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/StoryDataWrapper' + /v1/public/stories/{storyId}/characters: + get: + tags: + - public + summary: Fetches lists of characters filtered by a story id. + description: Fetches lists of comic characters appearing in a single story, + with optional filters. See notes on individual parameters below. + operationId: getCharactersByStoryIdCollection + parameters: + - name: storyId + in: path + description: The story ID. + required: true + schema: + type: integer + format: int32 + - name: name + in: query + description: Return only characters matching the specified full character + name (e.g. Spider-Man). + schema: + type: string + - name: nameStartsWith + in: query + description: Return characters with names that begin with the specified string + (e.g. Sp). + schema: + type: string + - name: modifiedSince + in: query + description: Return only characters which have been modified since the specified + date. + schema: + type: string + format: date + - name: comics + in: query + description: Return only characters which appear in the specified comics (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: series + in: query + description: Return only characters which appear the specified series (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: events + in: query + description: Return only characters which appear comics that took place in + the specified events (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/CharacterDataWrapper' + /v1/public/stories/{storyId}/comics: + get: + tags: + - public + summary: Fetches lists of comics filtered by a story id. + description: Fetches lists of comics in which a specific story appears, with + optional filters. See notes on individual parameters below. + operationId: getComicsByStoryIdCollection + parameters: + - name: storyId + in: path + description: The story ID. + required: true + schema: + type: integer + format: int32 + - name: format + in: query + description: Filter by the issue format (e.g. comic, digital comic, hardcover). + schema: + type: string + - name: formatType + in: query + description: Filter by the issue format type (comic or collection). + schema: + type: string + - name: noVariants + in: query + description: Exclude variant comics from the result set. + style: form + explode: false + schema: + type: array + items: + type: boolean + - name: dateDescriptor + in: query + description: Return comics within a predefined date range. + style: form + explode: false + schema: + type: array + items: + type: string + - name: dateRange + in: query + description: Return comics within a predefined date range. Dates must be + specified as date1,date2 (e.g. 2013-01-01,2013-01-02). Dates are preferably + formatted as YYYY-MM-DD but may be sent as any common date format. + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: title + in: query + description: Return only issues in series whose title matches the input. + schema: + type: string + - name: titleStartsWith + in: query + description: Return only issues in series whose title starts with the input. + schema: + type: string + - name: startYear + in: query + description: Return only issues in series whose start year matches the input. + schema: + type: integer + format: int32 + - name: issueNumber + in: query + description: Return only issues in series whose issue number matches the input. + schema: + type: integer + format: int32 + - name: diamondCode + in: query + description: Filter by diamond code. + schema: + type: string + - name: digitalId + in: query + description: Filter by digital comic id. + schema: + type: integer + format: int32 + - name: upc + in: query + description: Filter by UPC. + schema: + type: string + - name: isbn + in: query + description: Filter by ISBN. + schema: + type: string + - name: ean + in: query + description: Filter by EAN. + schema: + type: string + - name: issn + in: query + description: Filter by ISSN. + schema: + type: string + - name: hasDigitalIssue + in: query + description: Include only results which are available digitally. + style: form + explode: false + schema: + type: array + items: + type: boolean + - name: modifiedSince + in: query + description: Return only comics which have been modified since the specified + date. + schema: + type: string + format: date + - name: creators + in: query + description: Return only comics which feature work by the specified creators + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: characters + in: query + description: Return only comics which feature the specified characters (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: series + in: query + description: Return only comics which are part of the specified series (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: events + in: query + description: Return only comics which take place in the specified events (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: sharedAppearances + in: query + description: Return only comics in which the specified characters appear together + (for example in which BOTH Spider-Man and Wolverine appear). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: collaborators + in: query + description: Return only comics in which the specified creators worked together + (for example in which BOTH Stan Lee and Jack Kirby did work). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/ComicDataWrapper' + /v1/public/stories/{storyId}/creators: + get: + tags: + - public + summary: Fetches lists of creators filtered by a story id. + description: Fetches lists of comic creators whose work appears in a specific + story, with optional filters. See notes on individual parameters below. + operationId: getCreatorByStoryIdCollection + parameters: + - name: storyId + in: path + description: The story ID. + required: true + schema: + type: integer + format: int32 + - name: firstName + in: query + description: Filter by creator first name (e.g. brian). + schema: + type: string + - name: middleName + in: query + description: Filter by creator middle name (e.g. Michael). + schema: + type: string + - name: lastName + in: query + description: Filter by creator last name (e.g. Bendis). + schema: + type: string + - name: suffix + in: query + description: Filter by suffix or honorific (e.g. Jr., Sr.). + schema: + type: string + - name: nameStartsWith + in: query + description: Filter by creator names that match critera (e.g. B, St L). + schema: + type: string + - name: firstNameStartsWith + in: query + description: Filter by creator first names that match critera (e.g. B, St + L). + schema: + type: string + - name: middleNameStartsWith + in: query + description: Filter by creator middle names that match critera (e.g. Mi). + schema: + type: string + - name: lastNameStartsWith + in: query + description: Filter by creator last names that match critera (e.g. Ben). + schema: + type: string + - name: modifiedSince + in: query + description: Return only creators which have been modified since the specified + date. + schema: + type: string + format: date + - name: comics + in: query + description: Return only creators who worked on in the specified comics (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: series + in: query + description: Return only creators who worked on the specified series (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: events + in: query + description: Return only creators who worked on comics that took place in + the specified events (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/CreatorDataWrapper' + /v1/public/stories/{storyId}/events: + get: + tags: + - public + summary: Fetches lists of events filtered by a story id. + description: Fetches lists of events in which a specific story appears, with + optional filters. See notes on individual parameters below. + operationId: getEventsByStoryIdCollection + parameters: + - name: storyId + in: path + description: The story ID. + required: true + schema: + type: integer + format: int32 + - name: name + in: query + description: Filter the event list by name. + schema: + type: string + - name: nameStartsWith + in: query + description: Return events with names that begin with the specified string + (e.g. Sp). + schema: + type: string + - name: modifiedSince + in: query + description: Return only events which have been modified since the specified + date. + schema: + type: string + format: date + - name: creators + in: query + description: Return only events which feature work by the specified creators + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: characters + in: query + description: Return only events which feature the specified characters (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: series + in: query + description: Return only events which are part of the specified series (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: comics + in: query + description: Return only events which take place in the specified comics (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/EventDataWrapper' + /v1/public/stories/{storyId}/series: + get: + tags: + - public + summary: Fetches lists of series filtered by a story id. + description: Fetches lists of comic series in which the specified story takes + place. See notes on individual parameters below. + operationId: getStorySeriesCollection + parameters: + - name: storyId + in: path + description: The story ID. + required: true + schema: + type: integer + format: int32 + - name: events + in: query + description: Return only series which have comics that take place during the + specified events (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: title + in: query + description: Filter by series title. + schema: + type: string + - name: titleStartsWith + in: query + description: Return series with titles that begin with the specified string + (e.g. Sp). + schema: + type: string + - name: startYear + in: query + description: Return only series matching the specified start year. + schema: + type: integer + format: int32 + - name: modifiedSince + in: query + description: Return only series which have been modified since the specified + date. + schema: + type: string + format: date + - name: comics + in: query + description: Return only series which contain the specified comics (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: creators + in: query + description: Return only series which feature work by the specified creators + (accepts a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: characters + in: query + description: Return only series which feature the specified characters (accepts + a comma-separated list of ids). + style: form + explode: false + schema: + type: array + items: + type: integer + format: int32 + - name: seriesType + in: query + description: Filter the series by publication frequency type. + schema: + type: string + - name: contains + in: query + description: Return only series containing one or more comics with the specified + format. + style: form + explode: false + schema: + type: array + items: + type: string + - name: orderBy + in: query + description: Order the result set by a field or fields. Add a "-" to the value + sort in descending order. Multiple values are given priority in the order + in which they are passed. + style: form + explode: false + schema: + type: array + items: + type: string + - name: limit + in: query + description: Limit the result set to the specified number of resources. + schema: + type: integer + format: int32 + - name: offset + in: query + description: Skip the specified number of resources in the result set. + schema: + type: integer + format: int32 + responses: + 200: + description: No response was specified + content: + '*/*': + schema: + $ref: '#/components/schemas/SeriesDataWrapper' +components: + schemas: + ComicList: + type: object + properties: + available: + type: integer + description: The number of total available issues in this list. Will always + be greater than or equal to the "returned" value. + format: int32 + returned: + type: integer + description: The number of issues returned in this collection (up to 20). + format: int32 + collectionURI: + type: string + description: The path to the full list of issues in this collection. + items: + type: array + description: The list of returned issues in this collection. + items: + $ref: '#/components/schemas/ComicSummary' + EventList: + type: object + properties: + available: + type: integer + description: The number of total available events in this list. Will always + be greater than or equal to the "returned" value. + format: int32 + returned: + type: integer + description: The number of events returned in this collection (up to 20). + format: int32 + collectionURI: + type: string + description: The path to the full list of events in this collection. + items: + type: array + description: The list of returned events in this collection. + items: + $ref: '#/components/schemas/EventSummary' + CreatorList: + type: object + properties: + available: + type: integer + description: The number of total available creators in this list. Will always + be greater than or equal to the "returned" value. + format: int32 + returned: + type: integer + description: The number of creators returned in this collection (up to 20). + format: int32 + collectionURI: + type: string + description: The path to the full list of creators in this collection. + items: + type: array + description: The list of returned creators in this collection. + items: + $ref: '#/components/schemas/CreatorSummary' + CharacterList: + type: object + properties: + available: + type: integer + description: The number of total available characters in this list. Will + always be greater than or equal to the "returned" value. + format: int32 + returned: + type: integer + description: The number of characters returned in this collection (up to + 20). + format: int32 + collectionURI: + type: string + description: The path to the full list of characters in this collection. + items: + type: array + description: The list of returned characters in this collection. + items: + $ref: '#/components/schemas/CharacterSummary' + SeriesList: + type: object + properties: + available: + type: integer + description: The number of total available series in this list. Will always + be greater than or equal to the "returned" value. + format: int32 + returned: + type: integer + description: The number of series returned in this collection (up to 20). + format: int32 + collectionURI: + type: string + description: The path to the full list of series in this collection. + items: + type: array + description: The list of returned series in this collection. + items: + $ref: '#/components/schemas/SeriesSummary' + StoryList: + type: object + properties: + available: + type: integer + description: The number of total available stories in this list. Will always + be greater than or equal to the "returned" value. + format: int32 + returned: + type: integer + description: The number of stories returned in this collection (up to 20). + format: int32 + collectionURI: + type: string + description: The path to the full list of stories in this collection. + items: + type: array + description: The list of returned stories in this collection. + items: + $ref: '#/components/schemas/StorySummary' + CharacterSummary: + type: object + properties: + resourceURI: + type: string + description: The path to the individual character resource. + name: + type: string + description: The full name of the character. + role: + type: string + description: The role of the creator in the parent entity. + EventSummary: + type: object + properties: + resourceURI: + type: string + description: The path to the individual event resource. + name: + type: string + description: The name of the event. + SeriesSummary: + type: object + properties: + resourceURI: + type: string + description: The path to the individual series resource. + name: + type: string + description: The canonical name of the series. + ComicSummary: + type: object + properties: + resourceURI: + type: string + description: The path to the individual comic resource. + name: + type: string + description: The canonical name of the comic. + Url: + type: object + properties: + type: + type: string + description: A text identifier for the URL. + url: + type: string + description: A full URL (including scheme, domain, and path). + CreatorSummary: + type: object + properties: + resourceURI: + type: string + description: The path to the individual creator resource. + name: + type: string + description: The full name of the creator. + role: + type: string + description: The role of the creator in the parent entity. + StorySummary: + type: object + properties: + resourceURI: + type: string + description: The path to the individual story resource. + name: + type: string + description: The canonical name of the story. + type: + type: string + description: The type of the story (interior or cover). + Image: + type: object + properties: + path: + type: string + description: The directory path of to the image. + extension: + type: string + description: The file extension for the image. + ComicDate: + type: object + properties: + type: + type: string + description: A description of the date (e.g. onsale date, FOC date). + date: + type: string + description: The date. + format: date + CharacterDataContainer: + type: object + properties: + offset: + type: integer + description: The requested offset (number of skipped results) of the call. + format: int32 + limit: + type: integer + description: The requested result limit. + format: int32 + total: + type: integer + description: The total number of resources available given the current filter + set. + format: int32 + count: + type: integer + description: The total number of results returned by this call. + format: int32 + results: + type: array + description: The list of characters returned by the call. + items: + $ref: '#/components/schemas/Character' + EventDataContainer: + type: object + properties: + offset: + type: integer + description: The requested offset (number of skipped results) of the call. + format: int32 + limit: + type: integer + description: The requested result limit. + format: int32 + total: + type: integer + description: The total number of resources available given the current filter + set. + format: int32 + count: + type: integer + description: The total number of results returned by this call. + format: int32 + results: + type: array + description: The list of events returned by the call + items: + $ref: '#/components/schemas/Event' + ComicPrice: + type: object + properties: + type: + type: string + description: A description of the price (e.g. print price, digital price). + price: + type: number + description: The price (all prices in USD). + format: float + EventDataWrapper: + type: object + properties: + code: + type: integer + description: The HTTP status code of the returned result. + format: int32 + status: + type: string + description: A string description of the call status. + copyright: + type: string + description: The copyright notice for the returned result. + attributionText: + type: string + description: The attribution notice for this result. Please display either + this notice or the contents of the attributionHTML field on all screens + which contain data from the Marvel Comics API. + attributionHTML: + type: string + description: An HTML representation of the attribution notice for this result. Please + display either this notice or the contents of the attributionText field + on all screens which contain data from the Marvel Comics API. + data: + $ref: '#/components/schemas/EventDataContainer' + etag: + type: string + description: A digest value of the content returned by the call. + Creator: + type: object + properties: + id: + type: integer + description: The unique ID of the creator resource. + format: int32 + firstName: + type: string + description: The first name of the creator. + middleName: + type: string + description: The middle name of the creator. + lastName: + type: string + description: The last name of the creator. + suffix: + type: string + description: The suffix or honorific for the creator. + fullName: + type: string + description: The full name of the creator (a space-separated concatenation + of the above four fields). + modified: + type: string + description: The date the resource was most recently modified. + format: date + resourceURI: + type: string + description: The canonical URL identifier for this resource. + urls: + type: array + description: A set of public web site URLs for the resource. + items: + $ref: '#/components/schemas/Url' + thumbnail: + $ref: '#/components/schemas/Image' + series: + $ref: '#/components/schemas/SeriesList' + stories: + $ref: '#/components/schemas/StoryList' + comics: + $ref: '#/components/schemas/ComicList' + events: + $ref: '#/components/schemas/EventList' + Event: + type: object + properties: + id: + type: integer + description: The unique ID of the event resource. + format: int32 + title: + type: string + description: The title of the event. + description: + type: string + description: A description of the event. + resourceURI: + type: string + description: The canonical URL identifier for this resource. + urls: + type: array + description: A set of public web site URLs for the event. + items: + $ref: '#/components/schemas/Url' + modified: + type: string + description: The date the resource was most recently modified. + format: date + start: + type: string + description: The date of publication of the first issue in this event. + format: date + end: + type: string + description: The date of publication of the last issue in this event. + format: date + thumbnail: + $ref: '#/components/schemas/Image' + comics: + $ref: '#/components/schemas/ComicList' + stories: + $ref: '#/components/schemas/StoryList' + series: + $ref: '#/components/schemas/SeriesList' + characters: + $ref: '#/components/schemas/CharacterList' + creators: + $ref: '#/components/schemas/CreatorList' + next: + $ref: '#/components/schemas/EventSummary' + previous: + $ref: '#/components/schemas/EventSummary' + ComicDataContainer: + type: object + properties: + offset: + type: integer + description: The requested offset (number of skipped results) of the call. + format: int32 + limit: + type: integer + description: The requested result limit. + format: int32 + total: + type: integer + description: The total number of resources available given the current filter + set. + format: int32 + count: + type: integer + description: The total number of results returned by this call. + format: int32 + results: + type: array + description: The list of comics returned by the call + items: + $ref: '#/components/schemas/Comic' + TextObject: + type: object + properties: + type: + type: string + description: The canonical type of the text object (e.g. solicit text, preview + text, etc.). + language: + type: string + description: The IETF language tag denoting the language the text object + is written in. + text: + type: string + description: The text. + CreatorDataWrapper: + type: object + properties: + code: + type: integer + description: The HTTP status code of the returned result. + format: int32 + status: + type: string + description: A string description of the call status. + copyright: + type: string + description: The copyright notice for the returned result. + attributionText: + type: string + description: The attribution notice for this result. Please display either + this notice or the contents of the attributionHTML field on all screens + which contain data from the Marvel Comics API. + attributionHTML: + type: string + description: An HTML representation of the attribution notice for this result. Please + display either this notice or the contents of the attributionText field + on all screens which contain data from the Marvel Comics API. + data: + $ref: '#/components/schemas/CreatorDataContainer' + etag: + type: string + description: A digest value of the content returned by the call. + StoryDataWrapper: + type: object + properties: + code: + type: integer + description: The HTTP status code of the returned result. + format: int32 + status: + type: string + description: A string description of the call status. + copyright: + type: string + description: The copyright notice for the returned result. + attributionText: + type: string + description: The attribution notice for this result. Please display either + this notice or the contents of the attributionHTML field on all screens + which contain data from the Marvel Comics API. + attributionHTML: + type: string + description: An HTML representation of the attribution notice for this result. Please + display either this notice or the contents of the attributionText field + on all screens which contain data from the Marvel Comics API. + data: + $ref: '#/components/schemas/StoryDataContainer' + etag: + type: string + description: A digest value of the content returned by the call. + Character: + type: object + properties: + id: + type: integer + description: The unique ID of the character resource. + format: int32 + name: + type: string + description: The name of the character. + description: + type: string + description: A short bio or description of the character. + modified: + type: string + description: The date the resource was most recently modified. + format: date + resourceURI: + type: string + description: The canonical URL identifier for this resource. + urls: + type: array + description: A set of public web site URLs for the resource. + items: + $ref: '#/components/schemas/Url' + thumbnail: + $ref: '#/components/schemas/Image' + comics: + $ref: '#/components/schemas/ComicList' + stories: + $ref: '#/components/schemas/StoryList' + events: + $ref: '#/components/schemas/EventList' + series: + $ref: '#/components/schemas/SeriesList' + CharacterDataWrapper: + type: object + properties: + code: + type: integer + description: The HTTP status code of the returned result. + format: int32 + status: + type: string + description: A string description of the call status. + copyright: + type: string + description: The copyright notice for the returned result. + attributionText: + type: string + description: The attribution notice for this result. Please display either + this notice or the contents of the attributionHTML field on all screens + which contain data from the Marvel Comics API. + attributionHTML: + type: string + description: An HTML representation of the attribution notice for this result. Please + display either this notice or the contents of the attributionText field + on all screens which contain data from the Marvel Comics API. + data: + $ref: '#/components/schemas/CharacterDataContainer' + etag: + type: string + description: A digest value of the content returned by the call. + ComicDataWrapper: + type: object + properties: + code: + type: integer + description: The HTTP status code of the returned result. + format: int32 + status: + type: string + description: A string description of the call status. + copyright: + type: string + description: The copyright notice for the returned result. + attributionText: + type: string + description: The attribution notice for this result. Please display either + this notice or the contents of the attributionHTML field on all screens + which contain data from the Marvel Comics API. + attributionHTML: + type: string + description: An HTML representation of the attribution notice for this result. Please + display either this notice or the contents of the attributionText field + on all screens which contain data from the Marvel Comics API. + data: + $ref: '#/components/schemas/ComicDataContainer' + etag: + type: string + description: A digest value of the content returned by the call. + Series: + type: object + properties: + id: + type: integer + description: The unique ID of the series resource. + format: int32 + title: + type: string + description: The canonical title of the series. + description: + type: string + description: A description of the series. + resourceURI: + type: string + description: The canonical URL identifier for this resource. + urls: + type: array + description: A set of public web site URLs for the resource. + items: + $ref: '#/components/schemas/Url' + startYear: + type: integer + description: The first year of publication for the series. + format: int32 + endYear: + type: integer + description: The last year of publication for the series (conventionally, + 2099 for ongoing series) . + format: int32 + rating: + type: string + description: The age-appropriateness rating for the series. + modified: + type: string + description: The date the resource was most recently modified. + format: date + thumbnail: + $ref: '#/components/schemas/Image' + comics: + $ref: '#/components/schemas/ComicList' + stories: + $ref: '#/components/schemas/StoryList' + events: + $ref: '#/components/schemas/EventList' + characters: + $ref: '#/components/schemas/CharacterList' + creators: + $ref: '#/components/schemas/CreatorList' + next: + $ref: '#/components/schemas/SeriesSummary' + previous: + $ref: '#/components/schemas/SeriesSummary' + SeriesDataWrapper: + type: object + properties: + code: + type: integer + description: The HTTP status code of the returned result. + format: int32 + status: + type: string + description: A string description of the call status. + copyright: + type: string + description: The copyright notice for the returned result. + attributionText: + type: string + description: The attribution notice for this result. Please display either + this notice or the contents of the attributionHTML field on all screens + which contain data from the Marvel Comics API. + attributionHTML: + type: string + description: An HTML representation of the attribution notice for this result. Please + display either this notice or the contents of the attributionText field + on all screens which contain data from the Marvel Comics API. + data: + $ref: '#/components/schemas/SeriesDataContainer' + etag: + type: string + description: A digest value of the content returned by the call. + SeriesDataContainer: + type: object + properties: + offset: + type: integer + description: The requested offset (number of skipped results) of the call. + format: int32 + limit: + type: integer + description: The requested result limit. + format: int32 + total: + type: integer + description: The total number of resources available given the current filter + set. + format: int32 + count: + type: integer + description: The total number of results returned by this call. + format: int32 + results: + type: array + description: The list of series returned by the call + items: + $ref: '#/components/schemas/Series' + StoryDataContainer: + type: object + properties: + offset: + type: integer + description: The requested offset (number of skipped results) of the call. + format: int32 + limit: + type: integer + description: The requested result limit. + format: int32 + total: + type: integer + description: The total number of resources available given the current filter + set. + format: int32 + count: + type: integer + description: The total number of results returned by this call. + format: int32 + results: + type: array + description: The list of stories returned by the call + items: + $ref: '#/components/schemas/Story' + Comic: + type: object + properties: + id: + type: integer + description: The unique ID of the comic resource. + format: int32 + digitalId: + type: integer + description: The ID of the digital comic representation of this comic. Will + be 0 if the comic is not available digitally. + format: int32 + title: + type: string + description: The canonical title of the comic. + issueNumber: + type: number + description: The number of the issue in the series (will generally be 0 + for collection formats). + format: double + variantDescription: + type: string + description: If the issue is a variant (e.g. an alternate cover, second + printing, or director’s cut), a text description of the variant. + description: + type: string + description: The preferred description of the comic. + modified: + type: string + description: The date the resource was most recently modified. + format: date + isbn: + type: string + description: The ISBN for the comic (generally only populated for collection + formats). + upc: + type: string + description: The UPC barcode number for the comic (generally only populated + for periodical formats). + diamondCode: + type: string + description: The Diamond code for the comic. + ean: + type: string + description: The EAN barcode for the comic. + issn: + type: string + description: The ISSN barcode for the comic. + format: + type: string + description: The publication format of the comic e.g. comic, hardcover, + trade paperback. + pageCount: + type: integer + description: The number of story pages in the comic. + format: int32 + textObjects: + type: array + description: A set of descriptive text blurbs for the comic. + items: + $ref: '#/components/schemas/TextObject' + resourceURI: + type: string + description: The canonical URL identifier for this resource. + urls: + type: array + description: A set of public web site URLs for the resource. + items: + $ref: '#/components/schemas/Url' + series: + $ref: '#/components/schemas/SeriesSummary' + variants: + type: array + description: A list of variant issues for this comic (includes the "original" + issue if the current issue is a variant). + items: + $ref: '#/components/schemas/ComicSummary' + collections: + type: array + description: A list of collections which include this comic (will generally + be empty if the comic's format is a collection). + items: + $ref: '#/components/schemas/ComicSummary' + collectedIssues: + type: array + description: A list of issues collected in this comic (will generally be + empty for periodical formats such as "comic" or "magazine"). + items: + $ref: '#/components/schemas/ComicSummary' + dates: + type: array + description: A list of key dates for this comic. + items: + $ref: '#/components/schemas/ComicDate' + prices: + type: array + description: A list of prices for this comic. + items: + $ref: '#/components/schemas/ComicPrice' + thumbnail: + $ref: '#/components/schemas/Image' + images: + type: array + description: A list of promotional images associated with this comic. + items: + $ref: '#/components/schemas/Image' + creators: + $ref: '#/components/schemas/CreatorList' + characters: + $ref: '#/components/schemas/CharacterList' + stories: + $ref: '#/components/schemas/StoryList' + events: + $ref: '#/components/schemas/EventList' + CreatorDataContainer: + type: object + properties: + offset: + type: integer + description: The requested offset (number of skipped results) of the call. + format: int32 + limit: + type: integer + description: The requested result limit. + format: int32 + total: + type: integer + description: The total number of resources available given the current filter + set. + format: int32 + count: + type: integer + description: The total number of results returned by this call. + format: int32 + results: + type: array + description: The list of creators returned by the call. + items: + $ref: '#/components/schemas/Creator' + Story: + type: object + properties: + id: + type: integer + description: The unique ID of the story resource. + format: int32 + title: + type: string + description: The story title. + description: + type: string + description: A short description of the story. + resourceURI: + type: string + description: 'The canonical URL identifier for this resource. ' + type: + type: string + description: The story type e.g. interior story, cover, text story. + modified: + type: string + description: The date the resource was most recently modified. + format: date + thumbnail: + $ref: '#/components/schemas/Image' + comics: + $ref: '#/components/schemas/ComicList' + series: + $ref: '#/components/schemas/SeriesList' + events: + $ref: '#/components/schemas/EventList' + characters: + $ref: '#/components/schemas/CharacterList' + creators: + $ref: '#/components/schemas/CreatorList' + originalissue: + $ref: '#/components/schemas/ComicSummary' From 02c8da2b577fbd511981f49f584b982e6209619b Mon Sep 17 00:00:00 2001 From: Dave Date: Thu, 23 May 2024 16:48:52 +0200 Subject: [PATCH 09/14] write spec location into readme --- dlt_init_openapi/__init__.py | 26 +++++++------------ dlt_init_openapi/cli/__init__.py | 4 +-- dlt_init_openapi/config.py | 2 ++ dlt_init_openapi/renderer/default/__init__.py | 1 + .../renderer/default/templates/README.md.j2 | 5 ++++ tests/integration/utils.py | 3 ++- 6 files changed, 22 insertions(+), 19 deletions(-) diff --git a/dlt_init_openapi/__init__.py b/dlt_init_openapi/__init__.py index 5e95d64..12d956a 100644 --- a/dlt_init_openapi/__init__.py +++ b/dlt_init_openapi/__init__.py @@ -3,7 +3,7 @@ from enum import Enum from importlib.metadata import version from pathlib import Path -from typing import Optional, cast +from typing import cast import httpcore import httpx @@ -87,30 +87,28 @@ def print_warnings(self) -> None: logger.warning(w.msg) -def _get_document(*, url: Optional[str] = None, path: Optional[Path] = None, timeout: int = 60) -> bytes: - if url is not None and path is not None: +def _get_document(*, config: Config, timeout: int = 60) -> bytes: + if config.spec_url is not None and config.spec_path is not None: raise ValueError("Provide URL or Path, not both.") - if url is not None: - logger.info(f"Downloading spec from {url}") + if config.spec_url is not None: + logger.info(f"Downloading spec from {config.spec_url}") try: - response = httpx.get(url, timeout=timeout) + response = httpx.get(config.spec_url, timeout=timeout) logger.success("Download complete") return response.content except (httpx.HTTPError, httpcore.NetworkError) as e: raise ValueError("Could not get OpenAPI document from provided URL") from e - elif path is not None: - logger.info(f"Reading spec from {path}") - return Path(path).read_bytes() + elif config.spec_path is not None: + logger.info(f"Reading spec from {config.spec_path}") + return Path(config.spec_path).read_bytes() else: raise ValueError("No URL or Path provided") def _get_project_for_url_or_path( # pylint: disable=too-many-arguments - url: Optional[str], - path: Optional[Path], config: Config = None, ) -> Project: - doc = _get_document(url=url, path=path) + doc = _get_document(config=config) renderer_cls = cast(BaseRenderer, import_class_from_string(config.renderer_class)) detector_cls = cast(BaseDetector, import_class_from_string(config.detector_class)) @@ -126,8 +124,6 @@ def _get_project_for_url_or_path( # pylint: disable=too-many-arguments def create_new_client( *, - url: Optional[str] = None, - path: Optional[Path] = None, config: Config = None, ) -> Project: """ @@ -137,8 +133,6 @@ def create_new_client( The project. """ project = _get_project_for_url_or_path( - url=url, - path=path, config=config, ) project.parse() diff --git a/dlt_init_openapi/cli/__init__.py b/dlt_init_openapi/cli/__init__.py index 236ae20..9c75d3c 100644 --- a/dlt_init_openapi/cli/__init__.py +++ b/dlt_init_openapi/cli/__init__.py @@ -105,6 +105,8 @@ def _init_command_wrapped( "output_path": output_path, "endpoint_filter": questionary_endpoint_selection if interactive else None, "global_limit": global_limit, + "spec_url": url, + "spec_path": path, }, ) @@ -117,8 +119,6 @@ def _init_command_wrapped( exit(0) create_new_client( - url=url, - path=path, config=config, ) logger.success("Pipeline created. Learn more at https://dlthub.com/docs. See you next time :)") diff --git a/dlt_init_openapi/config.py b/dlt_init_openapi/config.py index 7d8e49c..1e39106 100644 --- a/dlt_init_openapi/config.py +++ b/dlt_init_openapi/config.py @@ -55,6 +55,8 @@ class Config(BaseModel): # internal, do not set via config file project_dir: Path = None pipeline_file_name: str = None + spec_url: str = None + spec_path: Path = None def __init__(self, *args: Any, **kwargs: Any) -> None: super(Config, self).__init__(*args, **kwargs) diff --git a/dlt_init_openapi/renderer/default/__init__.py b/dlt_init_openapi/renderer/default/__init__.py index 9b073fe..47cac70 100644 --- a/dlt_init_openapi/renderer/default/__init__.py +++ b/dlt_init_openapi/renderer/default/__init__.py @@ -55,6 +55,7 @@ def run(self, openapi: OpenapiParser, dry: bool = False) -> None: package_name=self.package_name, project_name=self.config.project_name, credentials=self.openapi.detected_global_security_scheme, + config=self.config, ) if dry: diff --git a/dlt_init_openapi/renderer/default/templates/README.md.j2 b/dlt_init_openapi/renderer/default/templates/README.md.j2 index d81e258..6882796 100644 --- a/dlt_init_openapi/renderer/default/templates/README.md.j2 +++ b/dlt_init_openapi/renderer/default/templates/README.md.j2 @@ -2,6 +2,11 @@ Created with [dlt-init-openapi](https://github.com/dlt-hub/dlt-init-openapi) v. {{version}} +{% if config.spec_path %}Generated from local spec at `{{ config.spec_path }}`.{% endif %} +{% if config.spec_url %}Generated from downloaded spec at `{{ config.spec_url }}`{% endif %} + +## Learn more at + * https://dlthub.com * https://github.com/dlt-hub/dlt * https://github.com/dlt-hub/dlt-init-openapi diff --git a/tests/integration/utils.py b/tests/integration/utils.py index 1a07a8d..8f9e4c0 100644 --- a/tests/integration/utils.py +++ b/tests/integration/utils.py @@ -22,10 +22,11 @@ def get_detected_project_from_open_api(case: str, config: Config) -> Project: config.project_name = "test" config.package_name = "test" + config.spec_path = case # type: ignore config.prepare() # get project and render source into string - project = _get_project_for_url_or_path(url=None, path=case, config=config) # type: ignore + project = _get_project_for_url_or_path(config=config) # type: ignore project.parse() project.detect() From d2e3cd858bf539eb42e49fb0082cf75dc913f2d4 Mon Sep 17 00:00:00 2001 From: Dave Date: Thu, 23 May 2024 17:09:33 +0200 Subject: [PATCH 10/14] fallback to first defined security scheme if none set globally --- dlt_init_openapi/detector/default/__init__.py | 6 + dlt_init_openapi/parser/openapi_parser.py | 1 - tests/cases/original_specs/chargebee.yaml | 146612 +++++++++++++++ tests/integration/basics/test_auth.py | 7 +- 4 files changed, 146624 insertions(+), 2 deletions(-) create mode 100644 tests/cases/original_specs/chargebee.yaml diff --git a/dlt_init_openapi/detector/default/__init__.py b/dlt_init_openapi/detector/default/__init__.py index c241bb8..bc5c727 100644 --- a/dlt_init_openapi/detector/default/__init__.py +++ b/dlt_init_openapi/detector/default/__init__.py @@ -126,6 +126,12 @@ def detect_security_schemes(self, open_api: OpenapiParser) -> None: elif global_scheme and not global_scheme.supported: self._add_warning(UnsupportedSecuritySchemeWarning(global_scheme.type)) + # set first auth as global scheme + if open_api.security_schemes and not open_api.detected_global_security_scheme: + global_scheme = list(open_api.security_schemes.values())[0] + if global_scheme.supported: + open_api.detected_global_security_scheme = global_scheme + def detect_resource_names(self, endpoints: EndpointCollection) -> None: """iterate all endpoints and find a strategy to select the right resource name""" diff --git a/dlt_init_openapi/parser/openapi_parser.py b/dlt_init_openapi/parser/openapi_parser.py index 015575c..36d30f4 100644 --- a/dlt_init_openapi/parser/openapi_parser.py +++ b/dlt_init_openapi/parser/openapi_parser.py @@ -39,7 +39,6 @@ def parse(self, data: bytes) -> None: self.spec_raw = self._load_yaml_or_json(data) self.security_schemes = {} - print(self.spec_raw) logger.info("Validating spec structure") try: spec = osp.OpenAPI.parse_obj(self.spec_raw) diff --git a/tests/cases/original_specs/chargebee.yaml b/tests/cases/original_specs/chargebee.yaml new file mode 100644 index 0000000..aba941e --- /dev/null +++ b/tests/cases/original_specs/chargebee.yaml @@ -0,0 +1,146612 @@ +openapi: 3.0.1 +info: + title: Chargebee API + contact: + name: Chargebee Support + url: https://www.chargebee.com + email: support@chargebee.com + version: v2 (PC 2.0) + x-cb-api-version: 2 + x-cb-product-catalog-version: 2 + x-generated-on: 1716471517536 +servers: +- url: "{protocol}://{site}.{environment}:{port}/api/v2" + description: Live Site + variables: + protocol: + default: https + enum: + - https + site: + description: Name of the site + default: demo + environment: + default: chargebee.com + enum: + - chargebee.com + port: + default: "443" + enum: + - "443" +- url: "{protocol}://{site}-test.{environment}:{port}/api/v2" + description: Test Site + variables: + protocol: + default: https + enum: + - https + site: + description: Name of the site + default: demo + environment: + default: chargebee.com + enum: + - chargebee.com + port: + default: "443" + enum: + - "443" +paths: + /subscriptions/{subscription-id}/remove_advance_invoice_schedule: + post: + summary: Remove an advance invoice schedules + description: | + **Caution** + + This API cannot be used for subscriptions that have [ramp](ramps?prod_cat_ver=2)s. + + Deletes an advance invoicing schedule. When *schedule_type = specific_dates*, you also have the option of deleting a part of the schedule. + operationId: remove_an_advance_invoice_schedules + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a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-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + specific_dates_schedule: + type: object + properties: + id: + type: array + description: | + When *schedule_type = specific_dates* , pass the id of the [specific_dates_schedule](advance_invoice_schedules#advance_invoice_schedule_specific_dates_schedule) that you want to remove. If not passed, the entire advance_invoice_schedule is removed. + items: + maxLength: 50 + type: string + deprecated: false + description: | + Parameters for specific_dates_schedule + deprecated: false + encoding: + specific_dates_schedule: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - subscription + type: object + properties: + subscription: + $ref: '#/components/schemas/Subscription' + advance_invoice_schedules: + type: array + items: + $ref: '#/components/schemas/AdvanceInvoiceSchedule' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/update_for_items: + post: + summary: Update subscription for items + description: "**Note:** This endpoint optionally supports 3DS. To use it, [create](./payment_intents?prod_cat_ver=2#create_a_payment_intent)\ + \ a `payment_intent` and provide it via this endpoint. \n**Caution**\n\n\ + If the subscription currently includes [ramp](ramps?prod_cat_ver=2)s, it's\ + \ important to note that any ramps scheduled to occur after an update to the\ + \ subscription will only be executed successfully if they do not conflict\ + \ with the changes introduced by that update. Carefully review your ramp configurations\ + \ and the details of the subscription update to prevent any unintended disruptions\ + \ to the subscription.\n\nUpdates the specified subscription by setting the\ + \ parameters passed. Any parameters not provided are left unmodified. If an\ + \ invoice is generated for this operation, any available [credits and excess\ + \ payments](./customers?prod_cat_ver=2#customer_balances) for the customer\ + \ are automatically applied.\n" + operationId: update_subscription_for_items + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-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)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + mandatory_items_to_remove: + type: array + description: | + Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver=2) that are to be removed from the subscription. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + replace_items_list: + type: boolean + description: | + If `true` then the existing `subscription_items` list for the subscription is replaced by the one provided. If `false` then the provided `subscription_items` list gets added to the existing list. + deprecated: false + default: false + net_term_days: + type: integer + description: | + Updates [Net D](https://www.chargebee.com/docs/net_d.html) for the subscription. Net D is the number of days within which any invoice raised for the subscription must be paid. + + * If the value is `0` or a positive integer: Net D is set explicitly for the subscription to the value provided. The value must be one of those defined in the [site configuration](https://www.chargebee.com/docs/net_d.html#enable-net-d-for-chargebee-invoices). + * If the value is `-1`: The attribute is reset and therefore not returned by the API. In this case, when an invoice is raised -- whether now or later -- the `net_term_days` defined at the [customer level](customers#customer_net_term_days) is considered. + * If the value is not provided: The attribute is left unaltered. + . + format: int32 + deprecated: false + invoice_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The document date displayed on the invoice PDF. The default value is the current date. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. Moreover, if `create_pending_invoices` is set to `true`, and if the site is configured to set invoice dates to date of closing, then upon invoice closure, this date is changed to the invoice closing date. taxes and line_item_taxes are computed based on the tax configuration as of `invoice_date`. When passing this parameter, the following prerequisites must be met: + + * `invoice_date` must be in the past. + * `invoice_date` is not more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December. + * It is not earlier than `changes_scheduled_at`, `reactivate_from`, or `trial_end`. + * `invoice_immediately` is `true`. + . + format: unix-time + deprecated: false + start_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The new start date of a `future` subscription. Applicable only for `future` subscriptions. + format: unix-time + deprecated: false + trial_end: + pattern: "^[0-9]{10}$" + type: integer + description: "The time at which the trial has ended or will end\ + \ for the subscription. Set it to `0` to have no trial period.\ + \ \n**Note**\n\n* This is only allowed when the subscription\ + \ `status` is `future`, `in_trial`, or `cancelled`.\n* The value\ + \ must not be earlier than `changes_scheduled_at` or `start_date`.\n\ + * This parameter can be backdated (set to a value in the past)\ + \ only when the subscription is in `cancelled` or `in_trial` `status`.\ + \ Do this to keep a record of when the trial ended in case it\ + \ ended at some point in the past. When `trial_end` is backdated,\ + \ the subscription immediately goes into `active` or `non_renewing`\ + \ status.\n" + format: unix-time + deprecated: false + billing_cycles: + minimum: 0 + type: integer + description: | + Billing cycles set for plan-item price is used by default. + format: int32 + deprecated: false + terms_to_charge: + minimum: 1 + type: integer + description: | + The number of subscription billing cycles to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html). If a new term is started for the subscription due to this API call, then `terms_to_charge` is inclusive of this new term. See description for the `force_term_reset` parameter to learn more about when a subscription term is reset. + format: int32 + deprecated: false + reactivate_from: + pattern: "^[0-9]{10}$" + type: integer + description: "If the subscription `status` is `cancelled` and it\ + \ is being reactivated via this operation, this is the date/time\ + \ at which the subscription should be reactivated. \n**Note:**\ + \ It is recommended not to pass this parameter along with `changed_scheduled_at`.\ + \ `reactivate_from` can be backdated (set to a value in the past).\ + \ Use backdating when the subscription has been reactivated already\ + \ but its billing has been delayed. Backdating is allowed only\ + \ when the following prerequisites are met:\n\n* Backdating must\ + \ be enabled for subscription reactivation operations.\n* The\ + \ current day of the month does not exceed the limit set in Chargebee\ + \ for backdating subscription change. This limit is the day of\ + \ the month by which the accounting for the previous month must\ + \ be closed.\n* The date is on or after the last date/time any\ + \ of the product catalog items of the subscription were changed.\n\ + * The date is not more than duration X into the past where X is\ + \ the billing period of the plan. For example, if the period of\ + \ the plan in the subscription is 2 months and today is 14th April,\ + \ `changes_scheduled_at` cannot be earlier than 14th February.\n\ + .\n" + format: unix-time + deprecated: false + billing_alignment_mode: + type: string + description: | + Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date) chosen for the site for calendar billing. Only applicable when using calendar billing. \* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly.. \* delayed - Subscription period will be aligned with the configured billing date at the next renewal. + deprecated: false + enum: + - immediate + - delayed + auto_collection: + type: string + description: | + Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property. \* on - Whenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available. \* off - Automatic collection of charges will not be made for this subscription. Use this for offline payments. + deprecated: false + enum: + - "on" + - "off" + offline_payment_method: + type: string + description: | + The preferred offline payment method for the subscription. \* sepa_credit - SEPA Credit \* cash - Cash \* no_preference - No Preference \* bank_transfer - Bank Transfer \* check - Check \* eu_automated_bank_transfer - EU Automated Bank Transfer \* jp_automated_bank_transfer - JP Automated Bank Transfer \* uk_automated_bank_transfer - UK Automated Bank Transfer \* custom - Custom \* boleto - Boleto \* mx_automated_bank_transfer - MX Automated Bank Transfer \* us_automated_bank_transfer - US Automated Bank Transfer \* ach_credit - ACH Credit + deprecated: false + enum: + - no_preference + - cash + - check + - bank_transfer + - ach_credit + - sepa_credit + - boleto + - us_automated_bank_transfer + - eu_automated_bank_transfer + - uk_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + - custom + po_number: + maxLength: 100 + type: string + description: | + Purchase order number for this subscription. + deprecated: false + coupon_ids: + type: array + description: | + List of coupons to be applied to this subscription. You can provide coupon ids or [coupon codes](https://apidocs.chargebee.com/docs/api/coupon_codes). If `changes_scheduled_at` is in the past, then the currently available coupons can be used even if they were not available as of the date for when the change is scheduled. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + replace_coupon_list: + type: boolean + description: | + If `true` then the existing `coupon_ids` list for the subscription is replaced by the one provided. If `false` then the provided list gets added to the existing `coupon_ids`. + deprecated: false + default: false + prorate: + type: boolean + description: | + * When `true`: [Prorated credits or charges](https://www.chargebee.com/docs/2.0/proration.html#proration-mechanism) are created as applicable for this change. + * When `false`: The subscription is changed without creating any credits or charges. + * When not provided, the value configured in the [site settings](https://www.chargebee.com/docs/2.0/proration.html#proration-for-subscription-change) is considered. + + **Caveat** + + For further changes within the same billing term, when `prorate` is set to `true`, **credits** are **not created** when **all** the conditions below hold true: + + An immediate previous change was made + + * with `prorate` set to `false` and + * no changes were made to the subscription's billing term and + * a change was made to either the subscription's items or their prices. + deprecated: false + end_of_term: + type: boolean + description: | + **Caution** + + This parameter is unavailable when the [Subscription Ramps](https://chargebee.com/docs/2.0/ramps.html) feature is enabled; use [Create a ramp API](ramps?prod_cat_ver=2#create_a_ramp) instead. + Set this to true if you want the update to be applied at the end of the current subscription billing cycle. + deprecated: false + default: false + force_term_reset: + type: boolean + description: "Say the subscription has the renewal date as 28th\ + \ of every month. When the plan-item price of the subscription\ + \ is set to one that has the same billing period as the current\ + \ plan-item price, the subscription change does not change the\ + \ term. In other words, the subscription still renews on the 28th.\ + \ Passing this parameter as `true` will have the subscription\ + \ reset its term to the current date (provided `end_of_term` is\ + \ false). \n**Note**: When the new plan-item price has a billing\ + \ period different from the current plan-item price of the subscription,\ + \ the term is always reset, regardless of the value passed for\ + \ this parameter.\n" + deprecated: false + default: false + reactivate: + type: boolean + description: | + When the `status` of the subscription is `cancelled`, this parameter determines whether the subscription is reactivated upon making this API request. Unless passed explicitly as `false`, this parameter is implied as `true` when you provide the `subscription_items` parameter. + deprecated: false + token_id: + maxLength: 40 + type: string + description: | + The Chargebee payment token generated by Chargebee JS. + deprecated: false + invoice_notes: + maxLength: 2000 + type: string + description: | + A customer-facing note added to all invoices associated with this subscription. This note is one among [all the notes](/docs/api/invoices#invoice_notes) displayed on the invoice PDF. + deprecated: false + meta_data: + type: object + additionalProperties: true + description: | + A collection of key-value pairs that provides extra information about the subscription. \*\*Note:\*\* There's a character limit of 65,535. \[Learn more\](advanced-features#metadata). + deprecated: false + invoice_immediately: + type: boolean + description: "If there are charges raised immediately for the subscription,\ + \ this parameter specifies whether those charges are to be invoiced\ + \ immediately or added to [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html).\ + \ The default value is as per the [site settings](https://www.chargebee.com/docs/unbilled-charges.html#configuration).\ + \ \n**Note:** `invoice_immediately` only affects charges that\ + \ are raised at the time of execution of this API call. Any charges\ + \ scheduled to be raised in the future are not affected by this\ + \ parameter. .\n" + deprecated: false + override_relationship: + type: boolean + description: | + If `true`, ignores the [hierarchy relationship](./customers?prod_cat_ver=2#customer_relationship) and uses customer as payment and invoice owner. + deprecated: false + changes_scheduled_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + **Caution** + + This parameter is unavailable when the [Subscription Ramps](https://chargebee.com/docs/2.0/ramps.html) feature is enabled; use [Create a ramp API](ramps?prod_cat_ver=2#create_a_ramp) instead. + When `change_option` is set to `specific_date`, then set the date/time at which the subscription change is to happen or has happened. **Note:** It is recommended not to pass this parameter along with `reactivate_from`. `changes_scheduled_at` can be set to a value in the past. This is called backdating the subscription change and is performed when the subscription change has already been provisioned but its billing has been delayed. Backdating is allowed only when the following prerequisites are met: + + * Backdating must be enabled for subscription change operations. + * Only the following changes can be backdated: + * Changes in the recurring items or their prices. + * Addition of non-recurring items. + * Subscription `status` is `active`, `cancelled`, or `non_renewing`. + * The current day of the month does not exceed the limit set in Chargebee for backdating subscription change. This limit is typically the day of the month by which the accounting for the previous month must be closed. + * The date is on or after `current_term_start`. + * The date is on or after the last date/time any of the following changes were made: + * Changes in the recurring items or their prices. + * Addition of non-recurring items. + * The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `changes_scheduled_at` cannot be earlier than 14th February. + . + format: unix-time + deprecated: false + change_option: + type: string + description: "Specifies the effective date for the subscription\ + \ change. \\* end_of_term - The change is carried out at the end\ + \ of the current billing cycle of the subscription. \\* specific_date\ + \ - Executes the change on a specified date. The change occurs\ + \ as of the date/time defined in `changes_scheduled_at`. \n**Caution**\n\ + \nThe `end_of_term` and `specific_date` options are unavailable\ + \ when the [Subscription Ramps](https://chargebee.com/docs/2.0/ramps.html)\ + \ feature is enabled; use [Create a ramp API](ramps?prod_cat_ver=2#create_a_ramp)\ + \ instead.\n\\* immediately - The change is carried out immediately.\n" + deprecated: false + enum: + - immediately + - end_of_term + - specific_date + contract_term_billing_cycle_on_renewal: + maximum: 100 + minimum: 1 + type: integer + description: | + Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles` or a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms). + format: int32 + deprecated: false + free_period: + minimum: 1 + type: integer + description: | + The period of time by which the first term of the subscription is to be extended free-of-charge. The value must be in multiples of free_period_unit. + format: int32 + deprecated: false + free_period_unit: + type: string + description: | + The unit of time in multiples of which the free_period parameter is expressed. The value must be equal to or lower than the [period_unit](/docs/api/plans#create_a_plan_period_unit) attribute of the [plan](/docs/api/subscriptions#create_a_subscription_plan_id) chosen. \* week - Charge based on week(s) \* month - Charge based on month(s) \* day - Charge based on day(s) \* year - Charge based on year(s) + deprecated: false + enum: + - day + - week + - month + - year + create_pending_invoices: + type: boolean + description: | + Indicates whether the invoices for this subscription are generated with a `pending` `status`. This attribute is set to `true` automatically when the subscription has item prices that belong to `metered` items. + + You can also set this to `true` explicitly using the [create](/docs/api/subscriptions#create_subscription_for_items_create_pending_invoices)/[update](/docs/api/subscriptions#update_subscription_for_items_create_pending_invoices) subscription operations. This is useful in the following scenarios: + + * When tracking usages and calculating usage-based charges on your end. You can then add them to the subscription as a [one-time charge](https://www.chargebee.com/docs/charges.html) at the end of the billing term. + * When you need to inspect all charges before closing invoices for this subscription. + + Applicable only when [Metered Billing](https://www.chargebee.com/docs/metered_billing.html) is enabled for the site + . + deprecated: false + auto_close_invoices: + type: boolean + description: | + Set to `false` to override for this subscription, the [site-level setting](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing) for auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute has a higher precedence than the same attribute at the [customer level](/docs/api/customers?prod_cat_ver=2#customer_auto_close_invoices). + deprecated: false + trial_end_action: + type: string + description: | + Applicable only when [End-of-trial Action](https://www.chargebee.com/docs/2.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions) has been enabled for the site. Whenever the subscription has a trial period, this attribute (parameter) is returned (required) and specifies the operation to be carried out for the subscription once the trial ends. \* activate_subscription - The subscription activates and charges are raised for non-metered items. \* cancel_subscription - The subscription cancels. \* plan_default - The action [configured for the site](https://www.chargebee.com/docs/trial_periods.html#how-to-define-the-end-of-trial-actions-for-subscriptions) at the time when the trial ends, takes effect. This is the default value when `trial_end_action` is defined for the plan. \* site_default - The action [configured for the site](https://www.chargebee.com/docs/trial_periods.html#how-to-define-the-end-of-trial-actions-for-subscriptions) at the time when the trial ends, takes effect. This is the default value when `trial_end_action` is **not** defined for the plan. + deprecated: false + enum: + - site_default + - plan_default + - activate_subscription + - cancel_subscription + payment_initiator: + type: string + description: | + The type of initiator to be used for the payment request triggered by this operation. \* customer - Pass this value to indicate that the request is initiated by the customer \* merchant - Pass this value to indicate that the request is initiated by the merchant + deprecated: false + enum: + - customer + - merchant + card: + type: object + properties: + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account in which this payment source is stored. + deprecated: false + first_name: + maxLength: 50 + type: string + description: | + Cardholder's first name + deprecated: false + last_name: + maxLength: 50 + type: string + description: | + Cardholder's last name + deprecated: false + number: + maxLength: 1500 + type: string + description: | + The credit card number without any format. If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js), you can specify the Braintree encrypted card number here. + deprecated: false + expiry_month: + maximum: 12 + minimum: 1 + type: integer + description: | + Card expiry month. + format: int32 + deprecated: false + expiry_year: + type: integer + description: | + Card expiry year. + format: int32 + deprecated: false + cvv: + maxLength: 520 + type: string + description: | + The card verification value (CVV). If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js), you can specify the Braintree encrypted CVV here. + deprecated: false + billing_addr1: + maxLength: 150 + type: string + description: | + Address line 1, as available in card billing address. + deprecated: false + billing_addr2: + maxLength: 150 + type: string + description: | + Address line 2, as available in card billing address. + deprecated: false + billing_city: + maxLength: 50 + type: string + description: | + City, as available in card billing address. + deprecated: false + billing_state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + billing_state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + billing_zip: + maxLength: 20 + type: string + description: | + Postal or Zip code, as available in card billing address. + deprecated: false + billing_country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`checkout_com\`: While adding a new payment method using \[permanent token\](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, \`document\` ID and \`country_of_residence\` are required to support payments through \[dLocal\](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). \* \`payer\`: User related information. \* \`country_of_residence\`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a \[two-character ISO code\](https://docs.checkout.com/resources/codes/country-codes). \* \`document\`: Document ID is the user's \[identification number\](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. \* \`bluesnap\`: While passing raw card details to BlueSnap, if \`fraud_session_id\` is added, \[additional validation\](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your \[BlueSnap fraud session ID\](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. \* \`braintree\`: While passing raw card details to Braintree, your \`fraud_merchant_id\` and the user's \`device_session_id\` can be added to perform \[additional validation\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`fraud_merchant_id\`: Your \[merchant ID\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. \* \`chargebee_payments\`: While passing raw card details to Chargebee Payments, if \`fraud_session_id\` is added, additional validation is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. \* \`bank_of_america\`: While passing raw card details to Bank of America, your user's \`device_session_id\` can be added to perform additional validation and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`ecentric\`: This parameter is used to verify and process payment method details in Ecentric. If the \`merchant_id\` parameter is included, Chargebee will vault it / perform a lookup and verification against this \`merchant_id\`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. \* \`merchant_id\`: Merchant GUID where the card is vaulted or need to be vaulted. \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries and \`device_session_id\` can be added to perform \[additional validation\](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device + deprecated: false + description: | + Parameters for card + deprecated: false + payment_method: + type: object + properties: + type: + type: string + description: | + The type of payment method. For more details refer [Update payment method for a customer](customers#update_payment_method_for_a_customer) API under Customer resource. \* google_pay - Payments made via Google Pay. \* sofort - Payments made via Sofort. \* netbanking_emandates - Netbanking (eMandates) Payments. \* apple_pay - Payments made via Apple Pay. \* unionpay - Payments made via UnionPay. \* giropay - Payments made via giropay. \* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created. \* bancontact - Payments made via Bancontact Card. \* upi - UPI Payments. \* alipay - Payments made via Alipay. \* pay_to - Payments made via PayTo \* wechat_pay - Payments made via WeChat Pay. \* sepa_instant_transfer - Payments made via Sepa Instant Transfer \* dotpay - Payments made via Dotpay. \* paypal_express_checkout - Payments made via PayPal Express Checkout. \* ideal - Payments made via iDEAL. \* generic - Payments made via Generic Payment Method. \* klarna_pay_now - Payments made via Klarna Pay Now \* faster_payments - Payments made via Faster Payments \* venmo - Payments made via Venmo \* automated_bank_transfer - Represents virtual bank account using which the payment will be done. \* amazon_payments - Payments made via Amazon Payments. \* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource. + deprecated: false + enum: + - card + - paypal_express_checkout + - amazon_payments + - direct_debit + - generic + - alipay + - unionpay + - apple_pay + - wechat_pay + - ideal + - google_pay + - sofort + - bancontact + - giropay + - dotpay + - upi + - netbanking_emandates + - venmo + - pay_to + - faster_payments + - sepa_instant_transfer + - automated_bank_transfer + - klarna_pay_now + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account in which this payment source is stored. + deprecated: false + reference_id: + maxLength: 200 + type: string + description: "The reference id. In the case of Amazon and PayPal\ + \ this will be the *billing agreement id* . For GoCardless\ + \ direct debit this will be 'mandate id'. In the case of card\ + \ this will be the identifier provided by the gateway/card\ + \ vault for the specific payment method resource. **Note:**\ + \ This is not the one-time temporary token provided by gateways\ + \ like Stripe. \nFor more details refer [Update payment\ + \ method for a customer](customers#update_payment_method_for_a_customer)\ + \ API under Customer resource.\n" + deprecated: false + tmp_token: + maxLength: 65000 + type: string + description: | + Single-use tokens created by payment gateways. In Stripe, a single-use token is created for Apple Pay Wallet, card details or direct debit. In Braintree, a nonce is created for Apple Pay Wallet, PayPal, or card details. In Authorize.Net, a nonce is created for card details. In Adyen, an encrypted data is created from the card details. + deprecated: false + issuing_country: + maxLength: 50 + type: string + description: "[ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\nIf you have enabled [EU\ + \ VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021\ + \ or have [manually\nenabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern\nIreland**) is available as an option.\n" + deprecated: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`checkout_com\`: While adding a new payment method using \[permanent token\](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, \`document\` ID and \`country_of_residence\` are required to support payments through \[dLocal\](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). \* \`payer\`: User related information. \* \`country_of_residence\`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a \[two-character ISO code\](https://docs.checkout.com/resources/codes/country-codes). \* \`document\`: Document ID is the user's \[identification number\](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. \* \`bluesnap\`: While passing raw card details to BlueSnap, if \`fraud_session_id\` is added, \[additional validation\](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your \[BlueSnap fraud session ID\](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. \* \`braintree\`: While passing raw card details to Braintree, your \`fraud_merchant_id\` and the user's \`device_session_id\` can be added to perform \[additional validation\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`fraud_merchant_id\`: Your \[merchant ID\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. \* \`chargebee_payments\`: While passing raw card details to Chargebee Payments, if \`fraud_session_id\` is added, additional validation is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. \* \`bank_of_america\`: While passing raw card details to Bank of America, your user's \`device_session_id\` can be added to perform additional validation and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`ecentric\`: This parameter is used to verify and process payment method details in Ecentric. If the \`merchant_id\` parameter is included, Chargebee will vault it / perform a lookup and verification against this \`merchant_id\`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. \* \`merchant_id\`: Merchant GUID where the card is vaulted or need to be vaulted. \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries and \`device_session_id\` can be added to perform \[additional validation\](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device + deprecated: false + description: | + Parameters for payment_method + deprecated: false + payment_intent: + type: object + properties: + id: + maxLength: 150 + type: string + description: | + Identifier for PaymentIntent generated by Chargebee.js. Applicable only when you are using Chargebee.js for completing the 3DS flow. The PaymentIntent should be in 'authorized' state while passing it here. You need not pass other PaymentIntent parameters if this is passed. + deprecated: false + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account used for performing the 3DS flow. + deprecated: false + gw_token: + maxLength: 65000 + type: string + description: | + Identifier for 3DS transaction/verification object at the gateway. Can be passed only after successfully completing the 3DS flow. Refer [3DS implementation in Chargebee](/docs/api/3ds_card_payments#3ds-gateway-side-implementation) to find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow. + deprecated: false + payment_method_type: + type: string + description: | + The list of payment method types (For example, card, ideal, sofort, bancontact, etc.) this Payment Intent is allowed to use. If payment method type is empty, Card is taken as the default type for all gateways except Razorpay. \* card - card \* dotpay - dotpay \* faster_payments - Faster Payments \* upi - upi \* google_pay - google_pay \* paypal_express_checkout - paypal_express_checkout \* klarna_pay_now - Klarna Pay Now \* ideal - ideal \* boleto - boleto \* direct_debit - direct_debit \* sepa_instant_transfer - Sepa Instant Transfer \* bancontact - bancontact \* venmo - Venmo \* pay_to - PayTo \* netbanking_emandates - netbanking_emandates \* apple_pay - apple_pay \* giropay - giropay \* sofort - sofort \* amazon_payments - Amazon Payments + deprecated: false + enum: + - card + - ideal + - sofort + - bancontact + - google_pay + - dotpay + - giropay + - apple_pay + - upi + - netbanking_emandates + - paypal_express_checkout + - direct_debit + - boleto + - venmo + - amazon_payments + - pay_to + - faster_payments + - sepa_instant_transfer + - klarna_pay_now + reference_id: + maxLength: 65000 + type: string + description: | + Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow. + deprecated: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`checkout_com\`: While adding a new payment method using \[permanent token\](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, \`document\` ID and \`country_of_residence\` are required to support payments through \[dLocal\](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). \* \`payer\`: User related information. \* \`country_of_residence\`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a \[two-character ISO code\](https://docs.checkout.com/resources/codes/country-codes). \* \`document\`: Document ID is the user's \[identification number\](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. \* \`bluesnap\`: While passing raw card details to BlueSnap, if \`fraud_session_id\` is added, \[additional validation\](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your \[BlueSnap fraud session ID\](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. \* \`braintree\`: While passing raw card details to Braintree, your \`fraud_merchant_id\` and the user's \`device_session_id\` can be added to perform \[additional validation\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`fraud_merchant_id\`: Your \[merchant ID\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. \* \`chargebee_payments\`: While passing raw card details to Chargebee Payments, if \`fraud_session_id\` is added, additional validation is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. \* \`bank_of_america\`: While passing raw card details to Bank of America, your user's \`device_session_id\` can be added to perform additional validation and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`ecentric\`: This parameter is used to verify and process payment method details in Ecentric. If the \`merchant_id\` parameter is included, Chargebee will vault it / perform a lookup and verification against this \`merchant_id\`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. \* \`merchant_id\`: Merchant GUID where the card is vaulted or need to be vaulted. \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries and \`device_session_id\` can be added to perform \[additional validation\](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device + deprecated: false + description: | + Parameters for payment_intent + deprecated: false + billing_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the billing contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the billing contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements).\ + \ \n**Brexit**\n\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for billing_address + deprecated: false + shipping_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for shipping_address + deprecated: false + statement_descriptor: + type: object + properties: + descriptor: + maxLength: 65000 + type: string + deprecated: false + deprecated: false + customer: + type: object + properties: + vat_number: + maxLength: 20 + type: string + description: | + The VAT/tax registration number for the customer. For customers with [billing_address](customers#customer_billing_address) `country` as `XI` (which is **United Kingdom - Northern Ireland** ), the first two characters of the [full VAT + number](https://en.wikipedia.org/wiki/VAT_identification_number) can be overridden by setting [vat_number_prefix](customers#customer_vat_number_prefix). + deprecated: false + vat_number_prefix: + maxLength: 10 + type: string + description: "An overridden value for the first two characters\ + \ of the [full VAT\nnumber](https://en.wikipedia.org/wiki/VAT_identification_number).\ + \ Only applicable specifically for customers with [billing_address](customers#customer_billing_address)\ + \ `country` as `XI` (which is **United Kingdom - Northern\ + \ Ireland** ). \n\nWhen you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or have [manually\nenabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, you have the option of setting\ + \ [billing_address](customers#customer_billing_address) `country`\ + \ as `XI`. That's the code for **United Kingdom - Northern\n\ + Ireland** . The first two characters of the VAT number in\ + \ such a case is `XI` by default. However, if the VAT number\ + \ was registered in UK, the value should be `GB`. Set `vat_number_prefix`\ + \ to `GB` for such cases.\n" + deprecated: false + entity_identifier_scheme: + maxLength: 50 + type: string + description: "The Peppol BIS scheme associated with the [vat_number](customers#customer_vat_number)\ + \ of the customer. This helps identify the specific type of\ + \ customer entity. For example, `DE:VAT` is used for a German\ + \ business entity while `DE:LWID45` is used for a German government\ + \ entity. The value must be from the list of possible values\ + \ and must correspond to the country provided under `billing_address.country`.\ + \ See [list of possible values](https://www.chargebee.com/docs/e-invoicing.html#supported-countries).\ + \ \n**Tip:**\n\n\nIf there are additional entity identifiers\ + \ for the customer not associated with the `vat_number`, they\ + \ can be provided as the `entity_identifiers[]` array.\n" + deprecated: false + is_einvoice_enabled: + type: boolean + description: "Determines whether the customer is e-invoiced.\ + \ When set to `true` or not set to any value, the customer\ + \ is e-invoiced so long as e-invoicing is enabled for their\ + \ country (`billing_address.country`). When set to `false`,\ + \ the customer is not e-invoiced even if e-invoicing is enabled\ + \ for their country. \n**Tip:**\n\n\nIt is possible to set\ + \ a value for this flag even when E-Invoicing is disabled.\ + \ However, it comes into effect only when E-Invoicing is enabled.\n" + deprecated: false + einvoicing_method: + type: string + description: | + Determines whether to send einvoice manually or automatic. \* automatic - Use this value to send e-invoice every time an invoice or credit note is created. \* manual - When manual is selected the automatic e-invoice sending is disabled. Use this value to send e-invoice manually through UI or API. \* site_default - The default value of the site which can be overridden at the customer level. + deprecated: false + enum: + - automatic + - manual + - site_default + entity_identifier_standard: + maxLength: 50 + type: string + description: "The standard used for specifying the `entity_identifier_scheme`.\ + \ Currently only `iso6523-actorid-upis` is supported and is\ + \ used by default when not provided. \n**Tip:**\n\n\nIf there\ + \ are additional entity identifiers for the customer not associated\ + \ with the `vat_number`, they can be provided as the `entity_identifiers[]`\ + \ array.\n" + deprecated: false + default: iso6523-actorid-upis + business_customer_without_vat_number: + type: boolean + description: | + Confirms that a customer is a valid business without an EU/UK VAT number. + deprecated: false + registered_for_gst: + type: boolean + description: | + Confirms that a customer is registered under GST. If set to `true` then the [Reverse Charge Mechanism](https://www.chargebee.com/docs/australian-gst.html#reverse-charge-mechanism) is applicable. This field is applicable only when Australian GST is configured for your site. + deprecated: false + description: | + Parameters for customer + deprecated: false + contract_term: + type: object + properties: + action_at_term_end: + type: string + description: |+ + Action to be taken when the contract term completes. \* renew_once - Used when you want to renew the contract term just once. Does the following: + * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](subscriptions#create_subscription_for_customer_contract_term_billing_cycle_on_renewal). + * The `action_at_term_end` for the new contract term is set to `cancel`. + \* cancel - Contract term completes and subscription is canceled. \* evergreen - Contract term completes and the subscription renews. \* renew - + * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](subscriptions#create_subscription_for_customer_contract_term_billing_cycle_on_renewal). + * The `action_at_term_end` for the new contract term is set to `renew`. + + deprecated: false + default: renew + enum: + - renew + - evergreen + - cancel + - renew_once + cancellation_cutoff_period: + type: integer + description: | + The number of days before [`contract_end`](contract_terms#contract_term_contract_end), during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure + format: int32 + deprecated: false + description: | + Parameters for contract_term + deprecated: false + subscription_items: + required: + - item_price_id + type: object + properties: + item_price_id: + type: array + description: | + The unique identifier of the item price. + items: + maxLength: 100 + type: string + deprecated: false + quantity: + type: array + description: | + The quantity of the item purchased + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + unit_price: + type: array + description: | + The price/per unit price of the item. When not provided, [the value set](/docs/api/item_prices?prod_cat_ver=2#item_price_attributes) for the item price is used. This is only applicable when the `pricing_model` of the item price is `flat_fee` or `per_unit`. Also, it is only allowed when [price overriding](https://www.chargebee.com/docs/price-override.html) is enabled for the site. The value depends on the type of currency. If `changes_scheduled_at` is in the past and a `unit_price` is not passed, then the item price's current unit price is considered even if the item price did not exist on the date as of when the change is scheduled. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + unit_price_in_decimal: + type: array + description: | + When [price overriding](https://www.chargebee.com/docs/price-override.html) is enabled for the site, the price or per-unit price of the item can be set here. The [value set for the item price](/docs/api/item_prices#item_price_price) is used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api#handling_currency_units) is enabled. If `changes_scheduled_at` is in the past and a `unit_price_in_decimal` is not passed, then the item price's current unit price is considered even if the item price did not exist on the date as of when the change is scheduled. + items: + maxLength: 39 + type: string + deprecated: false + billing_cycles: + type: array + description: "For the plan-item price: \nthe value determines\ + \ the number of billing cycles the subscription runs before\ + \ canceling automatically. If not provided, then [the value\ + \ set](./item_prices?prod_cat_ver=2#item_price_attributes)\ + \ for the plan-item price is used. \n\nFor addon-item prices:\ + \ \nIf [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html)\ + \ are enabled then this is the number of subscription billing\ + \ cycles for which the addon is included. If not provided,\ + \ then [the value set under attached addons](./attached_items?prod_cat_ver=2#attached_item_attributes)\ + \ is used. Further, if that value is not provided, then [the\ + \ value set for the addon-item price](./item_prices?prod_cat_ver=2#item_price_attributes)\ + \ is used.\n" + items: + minimum: 0 + type: integer + format: int32 + deprecated: false + trial_end: + type: array + description: | + The date/time when the trial period of the item ends. Applies to plan-items and----when [enabled](https://www.chargebee.com/docs/2.0/addons-trial.html)----addon-items as well. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + service_period_days: + type: array + description: | + The service period of the item in days from the day of charge. + items: + maximum: 730 + minimum: 1 + type: integer + format: int32 + deprecated: false + charge_on_event: + type: array + items: + type: string + description: | + When `charge_on_option` option is set to `on_event`, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items. \* contract_termination - when a contract term is [terminated](./subscriptions?prod_cat_ver=2#cancel_subscription_for_items_contract_term_cancel_option). \* subscription_trial_start - the time when the trial period of the subscription begins. \* subscription_activation - the moment a subscription enters an `active` or `non-renewing` state. Also includes reactivations of canceled subscriptions. \* plan_activation - same as subscription activation, but also includes the case when the plan-item of the subscription is changed. \* subscription_creation - the time of creation of the subscription. + deprecated: false + enum: + - subscription_creation + - subscription_trial_start + - plan_activation + - subscription_activation + - contract_termination + charge_once: + type: array + description: | + Indicates if the charge-item is to be charged only once or each time the `charge_on_event` occurs. This parameter only applies to charge-items. + items: + type: boolean + deprecated: false + charge_on_option: + type: array + items: + type: string + description: | + Indicates when the charge-item is to be charged. This parameter only applies to charge-items. \* immediately - The item is charged immediately on being added to the subscription. \* on_event - The item is charged at the occurrence of the event specified as `charge_on_event`. + deprecated: false + enum: + - immediately + - on_event + proration_type: + type: array + items: + type: string + description: "**Note**\n\nApplicable only for item prices\ + \ with:\n\n* [item_type](item_prices?prod_cat_ver=2#item_price_item_type)\ + \ = `addon`.\n* [pricing_model](item_prices?prod_cat_ver=2#item_price_pricing_model)\ + \ = `per_unit`.\nSpecifies how to manage charges or credits\ + \ for the addon item price during this subscription update.\ + \ You may use this parameter only if the change to the subscription\ + \ takes effect [immediately](subscriptions?prod_cat_ver=2#update_subscription_for_items_change_option).\ + \ \n**Note**\n\n* Once set, this parameter is saved as\ + \ part of the [subscription.subscription_items](subscriptions?prod_cat_ver=2#update_subscription_for_items_change_option)\ + \ attributes and automatically applies to any additional\ + \ changes to the addon during the current term. It's removed\ + \ from the subscription attributes at renewal. You can't\ + \ alter this parameter's value within the current term via\ + \ later API calls.\n* If you don't provide a value, Chargebee\ + \ determines the proration logic based on the following\ + \ precedence: this parameter \\> [prorate](subscriptions?prod_cat_ver=2#update_subscription_for_items_prorate)\ + \ parameter \\> [item_price.proration_type](item_prices?prod_cat_ver=2#item_price_proration_type)\ + \ \\> [site-wide proration](https://www.chargebee.com/docs/2.0/proration.html#proration-for-subscription-change)\ + \ setting.\n\\* none - Don't apply any charges or credits\ + \ for the addon. \\* full_term - Charge the full price of\ + \ the addon or give the full credit. Don't apply any proration.\ + \ \\* partial_term - Prorate the charges or credits for\ + \ the rest of the current term.\n" + deprecated: false + enum: + - full_term + - partial_term + - none + description: | + Parameters for subscription_items + deprecated: false + discounts: + required: + - apply_on + - duration_type + - operation_type + type: object + properties: + apply_on: + type: array + items: + type: string + description: | + The amount on the invoice to which the discount is applied. \* invoice_amount - The discount is applied to the invoice `sub_total`. \* specific_item_price - The discount is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id`. + deprecated: false + enum: + - invoice_amount + - specific_item_price + duration_type: + type: array + items: + type: string + description: | + Specifies the time duration for which this discount is attached to the subscription. \* limited_period - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period` and `period_unit`. \* forever - The discount is attached to the subscription and applied on the invoices till it is [explicitly removed](/docs/api/subscriptions?prod_cat_ver=2#update_subscription_for_items_discounts_operation_type). \* one_time - The discount stays attached to the subscription till it is applied on an invoice **once**. It is removed after that from the subscription. + deprecated: false + default: forever + enum: + - one_time + - forever + - limited_period + percentage: + type: array + description: | + The percentage of the original amount that should be deducted from it. Only applicable when `discount.type` is percentage. + items: + maximum: 100 + minimum: 0.01 + type: number + format: double + deprecated: false + amount: + type: array + description: | + The value of the discount. [The format of this value](https://apidocs.chargebee.com/docs/api?prod_cat_ver=2#currencies) depends on the kind of currency. This is only applicable when `discount.type` is `fixed_amount`. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + period: + type: array + description: | + The duration of time for which the discount is attached to the subscription, in `period_units`. Applicable only when `duration_type` is `limited_period`. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + period_unit: + type: array + items: + type: string + description: | + The unit of time for `period`. Applicable only when `duration_type` is `limited_period`. \* week - A period of 7 days. \* year - A period of 1 calendar year. \* day - A period of 24 hours. \* month - A period of 1 calendar month. + deprecated: false + enum: + - day + - week + - month + - year + included_in_mrr: + type: array + description: | + The discount is included in MRR calculations for your site. This attribute is only applicable when `duration_type` is `one_time` and when the [feature is enabled](https://www.chargebee.com/docs/reporting.html#dashboards_flexible-mrr-calculation) in Chargebee. Also, If the [site-level setting](https://www.chargebee.com/docs/reporting.html#chart_flexible-mrr-calculation) is to exclude one-time discounts from MRR calculations, this value is always returned `false`. + items: + type: boolean + deprecated: false + item_price_id: + type: array + description: | + The [id of the item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) in the subscription to which the discount is to be applied. Relevant only when `apply_on` = `specific_item_price`. + items: + maxLength: 100 + type: string + deprecated: false + operation_type: + type: array + items: + type: string + description: | + The operation to be carried out for the discount. \* remove - The discount (given by `discounts[id]`) is removed from the subscription. Subsequent invoices will no longer have the discount applied. **Tip:** If you want to replace a discount, `remove` it and `add` another in the same API call. \* add - The discount is attached to the subscription. + deprecated: false + enum: + - add + - remove + id: + type: array + description: | + The `id` of the `discount` to be removed. This parameter is only relevant when `discounts[operation_type]` is `remove`. + items: + maxLength: 50 + type: string + deprecated: false + description: | + Parameters for discounts + deprecated: false + item_tiers: + type: object + properties: + item_price_id: + type: array + description: | + The id of the item price for which the tier price is being overridden. + items: + maxLength: 100 + type: string + deprecated: false + starting_unit: + type: array + description: | + The lowest value in the quantity tier. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + ending_unit: + type: array + description: | + The highest value in the quantity tier. + items: + type: integer + format: int32 + deprecated: false + price: + type: array + description: | + The overridden price of the tier. The value depends on the [type of currency](./#handling_currency_units). + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + default: 0 + starting_unit_in_decimal: + type: array + description: | + The decimal representation of the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal` of the next lower tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + ending_unit_in_decimal: + type: array + description: | + The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal` of the next higher tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + price_in_decimal: + type: array + description: | + The decimal representation of the per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. When the `pricing_model` is `stairstep`, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: | + Parameters for item_tiers + deprecated: false + additionalProperties: true + encoding: + billing_address: + style: deepObject + explode: true + card: + style: deepObject + explode: true + contract_term: + style: deepObject + explode: true + customer: + style: deepObject + explode: true + discounts: + style: deepObject + explode: true + item_tiers: + style: deepObject + explode: true + payment_intent: + style: deepObject + explode: true + payment_method: + style: deepObject + explode: true + shipping_address: + style: deepObject + explode: true + statement_descriptor: + style: deepObject + explode: true + subscription_items: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - subscription + type: object + properties: + subscription: + $ref: '#/components/schemas/Subscription' + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + invoice: + $ref: '#/components/schemas/Invoice' + unbilled_charges: + type: array + items: + $ref: '#/components/schemas/UnbilledCharge' + credit_notes: + type: array + items: + $ref: '#/components/schemas/CreditNote' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/remove_coupons: + post: + summary: Remove coupons + description: | + **Caution** + + If there are scheduled [ramp](ramps?prod_cat_ver=2)s for the subscription, you can only perform this operation if the change does not conflict with any upcoming ramps. + Removes coupons associated with the subscription. If the param `coupon_ids` is not specified, all the coupons linked to the subscription are be removed. + operationId: remove_coupons + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-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9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + coupon_ids: + type: array + description: | + List of coupons to be removed from the subscription. You can provide only [coupon_id](https://apidocs.chargebee.com/docs/api/coupons#coupon_id) and not [coupon_code](https://apidocs.chargebee.com/docs/api/coupon_codes#coupon_code_code). + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - subscription + type: object + properties: + subscription: + $ref: '#/components/schemas/Subscription' + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/resume: + post: + summary: Resume a subscription + description: "**Note:** This operation optionally supports 3DS verification\ + \ flow. To achieve the same, create the [Payment Intent](/docs/api/#3ds-implementation-guide)\ + \ and pass it as input parameter to this API.\n\nThis API is used to resume\ + \ a **paused** subscription. On resumption the subscription will be activated\ + \ and any applicable charges will be initiated.\n\nYou could schedule the\ + \ resumption by passing **specific_date** parameter in resume_option. If scheduled,\ + \ the subscription will be resumed on the **specific_date** and moved to Active\ + \ state.\n\nFor in-term resumption, unless there are scheduled changes, unbilled\ + \ charges will not be charged.\n\n**What is an \"in-term resumption\"?** \ + \ \nAn \"in-term resumption\" is when the pause and resumption happens within\ + \ the billing term of the subscription.\n\n**Example :** A subscription was\ + \ billed from 1st to 31st of a month. It was paused on the 20th and resumed\ + \ before 31st. This is an in-term resumption.\n\n#### UNPAID INVOICES\n\n\ + Specifying **unpaid_invoices** allows you to close invoices of the subscription\ + \ which have amounts due. The invoices are chosen for payment collection after\ + \ applying the available credits and excess payments.\n\nIf specified as **schedule_payment_collection**,\ + \ payment collection for the amount due of past invoices will be attempted.\ + \ The payment method available will be charged if auto-collection is enabled\ + \ for the customer, and appropriate payment collection(payment succeeded or\ + \ payment failed) events will be triggered. If the payment collection fails,\ + \ no further retries will be made on the invoices.\n\n**Note:** If the invoices\ + \ of the subscription are consolidated, and any of the subscriptions in the\ + \ consolidated invoice are cancelled, these invoices will not be selected\ + \ for collection.\n" + operationId: resume_a_subscription + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2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a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + resume_option: + type: string + description: | + List of options to resume the subscription. \* specific_date - Resume on a specific date \* immediately - Resume immediately + deprecated: false + enum: + - immediately + - specific_date + resume_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + Date on which the subscription will be resumed. Applicable when **resume_option** is set as 'specific_date'. + format: unix-time + deprecated: false + charges_handling: + type: string + description: | + Applicable when charges get added during this operation and **resume_option** is set as 'immediately'. Allows to raise invoice immediately or add them to unbilled charges. \* add_to_unbilled_charges - Add to unbilled charges \* invoice_immediately - Invoice immediately + deprecated: false + enum: + - invoice_immediately + - add_to_unbilled_charges + unpaid_invoices_handling: + type: string + description: | + Applicable when the subscription has past due invoices and **resume_option** is set as 'immediately'. Allows to collect past due invoices or retain them as unpaid. If 'schedule_payment_collection' option is chosen in this field, remaining refundable credits and excess payments are applied. **Note:** The payment collection attempt will be asynchronous. \* no_action - Retain as unpaid \* schedule_payment_collection - Collect payment + deprecated: false + enum: + - no_action + - schedule_payment_collection + payment_initiator: + type: string + description: | + The type of initiator to be used for the payment request triggered by this operation. \* customer - Pass this value to indicate that the request is initiated by the customer \* merchant - Pass this value to indicate that the request is initiated by the merchant + deprecated: false + enum: + - customer + - merchant + payment_intent: + type: object + properties: + id: + maxLength: 150 + type: string + description: | + Identifier for PaymentIntent generated by Chargebee.js. Applicable only when you are using Chargebee.js for completing the 3DS flow. The PaymentIntent should be in 'authorized' state while passing it here. You need not pass other PaymentIntent parameters if this is passed. + deprecated: false + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account used for performing the 3DS flow. + deprecated: false + gw_token: + maxLength: 65000 + type: string + description: | + Identifier for 3DS transaction/verification object at the gateway. Can be passed only after successfully completing the 3DS flow. Refer [3DS implementation in Chargebee](/docs/api/3ds_card_payments#3ds-gateway-side-implementation) to find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow. + deprecated: false + payment_method_type: + type: string + description: | + The list of payment method types (For example, card, ideal, sofort, bancontact, etc.) this Payment Intent is allowed to use. If payment method type is empty, Card is taken as the default type for all gateways except Razorpay. \* giropay - giropay \* paypal_express_checkout - paypal_express_checkout \* card - card \* venmo - Venmo \* klarna_pay_now - Klarna Pay Now \* sofort - sofort \* amazon_payments - Amazon Payments \* netbanking_emandates - netbanking_emandates \* dotpay - dotpay \* ideal - ideal \* faster_payments - Faster Payments \* upi - upi \* direct_debit - direct_debit \* sepa_instant_transfer - Sepa Instant Transfer \* bancontact - bancontact \* pay_to - PayTo \* boleto - boleto \* google_pay - google_pay \* apple_pay - apple_pay + deprecated: false + enum: + - card + - ideal + - sofort + - bancontact + - google_pay + - dotpay + - giropay + - apple_pay + - upi + - netbanking_emandates + - paypal_express_checkout + - direct_debit + - boleto + - venmo + - amazon_payments + - pay_to + - faster_payments + - sepa_instant_transfer + - klarna_pay_now + reference_id: + maxLength: 65000 + type: string + description: | + Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow. + deprecated: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`checkout_com\`: While adding a new payment method using \[permanent token\](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, \`document\` ID and \`country_of_residence\` are required to support payments through \[dLocal\](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). \* \`payer\`: User related information. \* \`country_of_residence\`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a \[two-character ISO code\](https://docs.checkout.com/resources/codes/country-codes). \* \`document\`: Document ID is the user's \[identification number\](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. \* \`bluesnap\`: While passing raw card details to BlueSnap, if \`fraud_session_id\` is added, \[additional validation\](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your \[BlueSnap fraud session ID\](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. \* \`braintree\`: While passing raw card details to Braintree, your \`fraud_merchant_id\` and the user's \`device_session_id\` can be added to perform \[additional validation\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`fraud_merchant_id\`: Your \[merchant ID\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. \* \`chargebee_payments\`: While passing raw card details to Chargebee Payments, if \`fraud_session_id\` is added, additional validation is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. \* \`bank_of_america\`: While passing raw card details to Bank of America, your user's \`device_session_id\` can be added to perform additional validation and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`ecentric\`: This parameter is used to verify and process payment method details in Ecentric. If the \`merchant_id\` parameter is included, Chargebee will vault it / perform a lookup and verification against this \`merchant_id\`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. \* \`merchant_id\`: Merchant GUID where the card is vaulted or need to be vaulted. \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries and \`device_session_id\` can be added to perform \[additional validation\](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device + deprecated: false + description: | + Parameters for payment_intent + deprecated: false + encoding: + payment_intent: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - subscription + type: object + properties: + subscription: + $ref: '#/components/schemas/Subscription' + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + invoice: + $ref: '#/components/schemas/Invoice' + unbilled_charges: + type: array + items: + $ref: '#/components/schemas/UnbilledCharge' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/cancel_for_items: + post: + summary: Cancel subscription for items + description: "Cancels the specified subscription. \n**Warning**\n\nIf there\ + \ are [ramp](ramps?prod_cat_ver=2)s scheduled for the subscription, this operation\ + \ deletes any ramps that are set to become effective on or after the subscription's\ + \ cancellation time.\n\n#### Canceling contract terms\n\n* Subscriptions with\ + \ contract terms can only be canceled by [terminating the contract term](/docs/api/subscriptions?prod_cat_ver=2&lang=curl#cancel_subscription_for_items_contract_term_cancel_option).\n\ + * When canceling a contract term, the default value for the following parameters\ + \ is taken from the [site settings for contract terms](https://www.chargebee.com/docs/2.0/contract-terms.html#configuring-contract-terms)\ + \ instead of the [site settings for subscription cancellation](https://www.chargebee.com/docs/2.0/cancellations.html#configure-subscription-cancellation).\n\ + \ * `credit_option_for_current_term_charges`\n * `unbilled_charges_option`\n\ + \ * `account_receivables_handling`\n * `refundable_credits_handling`\n*\ + \ From among the parameters for this request, `end_of_term` or `cancel_at`\ + \ should not be passed when using contract terms; use `contract_term_cancel_option`\ + \ instead.\n* The `subscription_items` parameter is used to override price\ + \ or quantity for the termination fee. To use this parameter, the following\ + \ two conditions must be met:\n * `contract_term_cancel_option` must be set\ + \ to `terminate_now`.\n * the subscription must have a [subscription_items](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items)\ + \ attribute with `charge_on_event` set to `contract_term_termination`.\n" + operationId: cancel_subscription_for_items + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9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,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + end_of_term: + type: boolean + description: | + Set this to `true` if you want to cancel the subscription at the end of the current subscription billing cycle. The subscription `status` changes to `non_renewing`. + deprecated: false + default: false + cancel_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + Specify the date/time at which you want to cancel the subscription. This parameter should not be provided when `end_of_term` is passed as `true`. `cancel_at` can be set to a value in the past. This is called backdating. Use backdating when the subscription has been canceled already but its billing has been delayed. The following prerequisites must be met to allow backdating: + + * Backdating must be enabled for subscription cancellation. + * The current day of the month does not exceed the limit set in Chargebee for backdating subscription cancellation. This limit is typically the day of the month by which the accounting for the previous month must be closed. + * The date is on or after `current_term_start`. + * The date is on or after the last date/time any of the following changes were made: + * Changes in the recurring items or their prices. + * Addition of non-recurring items. + * The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the subscription's plan is 2 months and today is 14th April, `changes_scheduled_at` cannot be earlier than 14th February. + . + format: unix-time + deprecated: false + credit_option_for_current_term_charges: + type: string + description: | + For immediate cancellation (`end_of_term` = `false`), specify how to provide credits for current term charges. When not provided, the [site default](https://www.chargebee.com/docs/cancellations.html#configure-subscription-cancellation) is considered. \* none - No credits notes are created. \* full - Credits are issues for the full value of the current term charges. \* prorate - Prorated credits are issued. + deprecated: false + enum: + - none + - prorate + - full + unbilled_charges_option: + type: string + description: | + For immediate cancellation (`end_of_term` = `false`), specify how to handle any unbilled charges. When not provided, the [site default](https://www.chargebee.com/docs/cancellations.html#configure-subscription-cancellation) is considered. \* invoice - An invoice is generated immediately with the unbilled charges. \* delete - The unbilled charges are deleted. + deprecated: false + enum: + - invoice + - delete + account_receivables_handling: + type: string + description: | + Applicable when the subscription has past due invoices. Specify this if you want to close the due invoices of the subscription. If specified as schedule_payment_collection/write_off, the due invoices of the subscription will be qualified for the selected operation after the remaining refundable credits and excess payments are applied. **Note:** The payment collection attempt will be asynchronous. Not applicable when 'end_of_term' is true. \* no_action - No action is taken. \* write_off - The amount due in the invoices will be written-off. Credit notes created due to write-off will not be sent in the response. \* schedule_payment_collection - An automatic charge for the due amount of the past invoices will be attempted on the payment method available, if customer's auto-collection property is 'ON'. + deprecated: false + enum: + - no_action + - schedule_payment_collection + - write_off + refundable_credits_handling: + type: string + description: | + Applicable when the customer has remaining refundable credits(issued against online payments). If specified as schedule_refund, the refund will be initiated for these credits after they are applied against the subscription's past due invoices if any. **Note:** The refunds initiated will be asynchronous. Not applicable when 'end_of_term' is true. \* schedule_refund - Initiates refund of the remaining credits. \* no_action - No action is taken. + deprecated: false + enum: + - no_action + - schedule_refund + contract_term_cancel_option: + type: string + description: | + Cancels the current contract term. + + * `terminate_immediately` immediately does the following: + * sets the contract term [`status`](contract_terms#contract_term_status) to `terminated`. + * Cancels the subscription. + * Collects any [termination fee](contract_terms#termintation_fee). + * `end_of_contract_term` Sets the [`contract_term[action_at_term_end]`](contract_terms#contract_term_action_at_term_end) to `cancel`. In other words, the contract term is not renewed and the subscription is canceled at the end of the contract term. + . \* terminate_immediately - Terminate immediately \* end_of_contract_term - End of contract term + deprecated: false + enum: + - terminate_immediately + - end_of_contract_term + invoice_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The document date displayed on the invoice PDF. The default value is the current date. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. Moreover, if `create_pending_invoices` is `true`, and if the site is configured to set invoice dates to date of closing, then upon invoice closure, this date is changed to the invoice closing date. `taxes` and `line_item_taxes` are computed based on the `tax` configuration as of `invoice_date`. When passing this parameter, the following prerequisites must be met: + + * `invoice_date` must be in the past. + * `invoice_date` is not more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December. + * It is not earlier than `cancel_at`. + . + format: unix-time + deprecated: false + cancel_reason_code: + maxLength: 100 + type: string + description: | + Reason code for canceling the subscription. Must be one from a list of reason codes set in the Chargebee app in **Settings \> Configure Chargebee \> Reason Codes \> Subscriptions \> Subscription Cancellation**. Must be passed if set as mandatory in the app. The codes are case-sensitive. + deprecated: false + subscription_items: + type: object + properties: + item_price_id: + type: array + description: | + The unique `id` of the charge item_price that represents the termination fee. + items: + maxLength: 100 + type: string + deprecated: false + quantity: + type: array + description: | + The quantity associated with the termination fee. Applicable only when the item_price for the termination charge is quantity-based. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + unit_price: + type: array + description: | + The termination fee. In case it is quantity-based, this is the fee per unit. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + unit_price_in_decimal: + type: array + description: | + When [price overriding](https://www.chargebee.com/docs/2.0/price-override.html) is enabled for the site, the price or per-unit price of the item can be set here. The [value set for the item price](https://apidocs.chargebee.com/docs/api/item_prices#item_price_price) is used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + service_period_days: + type: array + description: | + The service period of the termination fee---expressed in days---starting from the current date. + items: + maximum: 730 + minimum: 1 + type: integer + format: int32 + deprecated: false + description: | + Parameters for subscription_items + deprecated: false + encoding: + subscription_items: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - subscription + type: object + properties: + subscription: + $ref: '#/components/schemas/Subscription' + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + invoice: + $ref: '#/components/schemas/Invoice' + unbilled_charges: + type: array + items: + $ref: '#/components/schemas/UnbilledCharge' + credit_notes: + type: array + items: + $ref: '#/components/schemas/CreditNote' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/regenerate_invoice: + post: + summary: Regenerate an invoice + description: "Regenerates the current invoice for the subscription. The current\ + \ invoice is that which includes non-`metered` items from the current term\ + \ and `metered` items from the previous term of the subscription. \n\n####\ + \ prerequisites\n\n* The current invoice of the subscription must have been\ + \ [voided](/docs/api/invoices?prod_cat_ver=2#void_an_invoice) or [deleted](/docs/api/invoices?prod_cat_ver=2#delete_an_invoice).\n\ + * The subscription `status` must be `active` or `non_renewing`.\n* There should\ + \ be no [unbilled charges](/docs/api/unbilled_charges?prod_cat_ver=2) for\ + \ non-`metered` items for the current term.\n* There should be no [unbilled\ + \ charges](/docs/api/unbilled_charges?prod_cat_ver=2) for `metered` items\ + \ for the previous term.\n* The subscription must not have any [advance invoice](https://www.chargebee.com/docs/2.0/advance-invoices.html#generating-an-advance-invoice)\ + \ or [advance invoice schedule](https://www.chargebee.com/docs/2.0/advance-invoices.html#generating-an-advance-invoice_setting-up-an-advance-invoicing-schedule).\n\ + \n#### deleting an invoice\n\nUsages are also deleted when an invoice is deleted.\ + \ Therefore, if the invoice was deleted, you may [add](/docs/api/usages?prod_cat_ver=2#create_a_usage)\ + \ or [bulk import](https://www.chargebee.com/docs/2.0/bulk-operations.html#overview_available-bulk-operations)\ + \ usages before regenerating an invoice.\n" + operationId: regenerate_an_invoice + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]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:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + date_from: + pattern: "^[0-9]{10}$" + type: integer + description: | + The start date of the period being invoiced. The default value is [current_term_start](https://apidocs.chargebee.com/docs/api/subscriptions#subscription_current_term_start ). + format: unix-time + deprecated: false + date_to: + pattern: "^[0-9]{10}$" + type: integer + description: | + The end date of the period being invoiced. The default value is [current_term_end](https://apidocs.chargebee.com/docs/api/subscriptions#subscription_current_term_end ). + format: unix-time + deprecated: false + prorate: + type: boolean + description: | + Whether the charges should be prorated according to the term specified by `date_from` and `date_to`. Should not be passed without `date_from` and `date_to`. + deprecated: false + invoice_immediately: + type: boolean + description: | + Only applicable when [Consolidated Invoicing](https://www.chargebee.com/docs/consolidated-invoicing.html ) is enabled for the customer. Set to `false` to leave the current term charge for the subscription as [unbilled](https://www.chargebee.com/docs/unbilled-charges.html ). Once you have done this for all suitable subscriptions of the customer, call [Create an invoice for unbilled charges](https://apidocs.chargebee.com/docs/api/unbilled_charges#create_an_invoice_for_unbilled_charges ) to invoice them. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + unbilled_charges: + type: array + items: + $ref: '#/components/schemas/UnbilledCharge' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions: + get: + summary: List subscriptions + description: | + Returns a list of subscriptions meeting **all** the conditions specified in the filter parameters below. + operationId: list_subscriptions + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\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})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: include_deleted + in: query + description: Indicates whether to include deleted objects in the list. The + deleted objects have the attribute deleted as true. + required: false + style: form + explode: true + schema: + type: boolean + default: false + - name: id + in: query + description: "optional, string filter
A\ + \ unique and immutable identifier for the subscription. If not provided,\ + \ it is autogenerated.
Supported operators : is, is_not, starts_with,\ + \ in, not_in

Example id[is_not]\ + \ = \"8gsnbYfsMLds\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: 8gsnbYfsMLds + deprecated: false + - name: customer_id + in: query + description: "optional, string filter
Identifier\ + \ of the customer with whom this subscription is associated.
Supported\ + \ operators : is, is_not, starts_with, in, not_in

Example\ + \ customer_id[is] = \"8gsnbYfsMLds\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: 8gsnbYfsMLds + deprecated: false + - name: item_id + in: query + description: "optional, string filter
The\ + \ plan item code.
Supported operators : is, is_not, starts_with,\ + \ in, not_in

Example item_id[is_not]\ + \ = \"silver\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: silver + deprecated: false + - name: item_price_id + in: query + description: "optional, string filter
The\ + \ plan item price code.
Supported operators : is, is_not, starts_with,\ + \ in, not_in

Example item_price_id[is]\ + \ = \"silver-USD-monthly\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: silver-USD-monthly + deprecated: false + - name: status + in: query + description: "optional, enumerated string filter
Current\ + \ state of the subscription. Possible values are : future, in_trial,\ + \ active, non_renewing, paused, cancelled.
Supported operators\ + \ : is, is_not, in, not_in

Example status[is_not] = \"active\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`future\` - The subscription is scheduled to start at a future date. \* \`in_trial\` - The subscription is in trial. \* \`active\` - The subscription is active and will be charged for automatically based on the items in it. \* \`non_renewing\` - The subscription will be canceled at the end of the current term. \* \`paused\` - The subscription is [paused](https://www.chargebee.com/docs/2.0/pause-subscription.html). The subscription will not renew while in this state. \* \`cancelled\` - The subscription has been canceled and is no longer in service. \* \`transferred\` - The subscription has been transferred to another business entity within the organization. + enum: + - future + - in_trial + - active + - non_renewing + - paused + - cancelled + - transferred + is_not: + type: string + description: | + \* \`future\` - The subscription is scheduled to start at a future date. \* \`in_trial\` - The subscription is in trial. \* \`active\` - The subscription is active and will be charged for automatically based on the items in it. \* \`non_renewing\` - The subscription will be canceled at the end of the current term. \* \`paused\` - The subscription is [paused](https://www.chargebee.com/docs/2.0/pause-subscription.html). The subscription will not renew while in this state. \* \`cancelled\` - The subscription has been canceled and is no longer in service. \* \`transferred\` - The subscription has been transferred to another business entity within the organization. + enum: + - future + - in_trial + - active + - non_renewing + - paused + - cancelled + - transferred + in: + pattern: "^\\[(future|in_trial|active|non_renewing|paused|cancelled|transferred)(,(future|in_trial|active|non_renewing|paused|cancelled|transferred))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(future|in_trial|active|non_renewing|paused|cancelled|transferred)(,(future|in_trial|active|non_renewing|paused|cancelled|transferred))*\\\ + ]$" + type: string + example: active + deprecated: false + - name: cancel_reason + in: query + description: "optional, enumerated string filter
The\ + \ reason for canceling the subscription. Set by Chargebee automatically.\ + \ Possible values are : not_paid, no_card, fraud_review_failed, non_compliant_eu_customer,\ + \ tax_calculation_failed, currency_incompatible_with_gateway, non_compliant_customer.
Supported\ + \ operators : is, is_not, in, not_in, is_present

Example cancel_reason[is] = \"not_paid\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`not_paid\` - Not Paid \* \`no_card\` - No Card \* \`fraud_review_failed\` - Fraud Review Failed \* \`non_compliant_eu_customer\` - Non Compliant EU Customer \* \`tax_calculation_failed\` - Tax Calculation Failed \* \`currency_incompatible_with_gateway\` - Currency incompatible with Gateway \* \`non_compliant_customer\` - Non Compliant Customer + enum: + - not_paid + - no_card + - fraud_review_failed + - non_compliant_eu_customer + - tax_calculation_failed + - currency_incompatible_with_gateway + - non_compliant_customer + is_not: + type: string + description: | + \* \`not_paid\` - Not Paid \* \`no_card\` - No Card \* \`fraud_review_failed\` - Fraud Review Failed \* \`non_compliant_eu_customer\` - Non Compliant EU Customer \* \`tax_calculation_failed\` - Tax Calculation Failed \* \`currency_incompatible_with_gateway\` - Currency incompatible with Gateway \* \`non_compliant_customer\` - Non Compliant Customer + enum: + - not_paid + - no_card + - fraud_review_failed + - non_compliant_eu_customer + - tax_calculation_failed + - currency_incompatible_with_gateway + - non_compliant_customer + in: + pattern: "^\\[(not_paid|no_card|fraud_review_failed|non_compliant_eu_customer|tax_calculation_failed|currency_incompatible_with_gateway|non_compliant_customer)(,(not_paid|no_card|fraud_review_failed|non_compliant_eu_customer|tax_calculation_failed|currency_incompatible_with_gateway|non_compliant_customer))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(not_paid|no_card|fraud_review_failed|non_compliant_eu_customer|tax_calculation_failed|currency_incompatible_with_gateway|non_compliant_customer)(,(not_paid|no_card|fraud_review_failed|non_compliant_eu_customer|tax_calculation_failed|currency_incompatible_with_gateway|non_compliant_customer))*\\\ + ]$" + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + example: not_paid + deprecated: false + - name: cancel_reason_code + in: query + description: "optional, string filter
\ + \ Reason code for canceling the subscription. Must be one from a list of\ + \ reason codes set in the Chargebee app in Settings > Configure\ + \ Chargebee > Reason Codes > Subscriptions > Subscription Cancellation.\ + \ Must be passed if set as mandatory in the app. The codes are case-sensitive.
Supported\ + \ operators : is, is_not, starts_with, in, not_in

Example\ + \ cancel_reason_code[is] =\ + \ \"Not Paid\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: Not Paid + deprecated: false + - name: remaining_billing_cycles + in: query + description: "optional, integer filter
  • When\ + \ the subscription is not on a contract term: this value is the number of\ + \ billing cycles remaining after the current cycle, at the end of which,\ + \ the subscription cancels.
  • When the subscription is on a contract term: this value is the number of billing\ + \ cycles remaining in the contract term after the current billing cycle.
.
Supported\ + \ operators : is, is_not, lt, lte, gt, gte, between, is_present

Example\ + \ remaining_billing_cycles[is_not]\ + \ = \"3\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + example: "3" + deprecated: false + - name: created_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
The time at which the subscription was created.
Supported\ + \ operators : after, before, on, between

Example created_at[before] = \"1435054328\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1435054328" + deprecated: false + - name: activated_at + in: query + description: |- + optional, timestamp(UTC) in seconds filter
Time at which the subscription status last changed to  + active. For example, this value is updated when an in_trial or  + cancelled subscription activates.
Supported operators : after, before, on, between, is_present

Example activated_at[after] = "1435054328" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + example: "1435054328" + deprecated: false + - name: next_billing_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
The date/time at which the next billing for the subscription\ + \ happens. This is usually right after current_term_end unless\ + \ multiple subscription terms were invoiced in advance using the terms_to_charge\ + \ parameter.
Supported operators : after, before, on, between

Example\ + \ next_billing_at[after] =\ + \ \"1435054328\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1435054328" + deprecated: false + - name: cancelled_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
Time at which subscription was cancelled or is set to\ + \ be cancelled.
Supported operators : after, before, on, between

Example\ + \ cancelled_at[after] = \"\ + 1435054328\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1435054328" + deprecated: false + - name: has_scheduled_changes + in: query + description: "optional, boolean filter
If\ + \ true, there are subscription changes scheduled on next renewal.\ + \ Possible values are : true, false
Supported operators : is

Example\ + \ has_scheduled_changes[is]\ + \ = \"true\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + example: "true" + deprecated: false + - name: updated_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
To filter based on updated_at. This attribute\ + \ will be present only if the resource has been updated after 2016-09-28.\ + \ It is advisable when using this filter, to pass the sort_by\ + \ input parameter as updated_at for a faster response.
Supported\ + \ operators : after, before, on, between

Example updated_at[after] = \"1243545465\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1243545465" + deprecated: false + - name: offline_payment_method + in: query + description: "optional, enumerated string filter
The\ + \ preferred offline payment method for the subscription. Possible values\ + \ are : no_preference, cash, check, bank_transfer, ach_credit, sepa_credit.
Supported\ + \ operators : is, is_not, in, not_in

Example offline_payment_method[is_not] = \"cash\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`no_preference\` - No Preference \* \`cash\` - Cash \* \`check\` - Check \* \`bank_transfer\` - Bank Transfer \* \`ach_credit\` - ACH Credit \* \`sepa_credit\` - SEPA Credit \* \`boleto\` - Boleto \* \`us_automated_bank_transfer\` - US Automated Bank Transfer \* \`eu_automated_bank_transfer\` - EU Automated Bank Transfer \* \`uk_automated_bank_transfer\` - UK Automated Bank Transfer \* \`jp_automated_bank_transfer\` - JP Automated Bank Transfer \* \`mx_automated_bank_transfer\` - MX Automated Bank Transfer \* \`custom\` - Custom + enum: + - no_preference + - cash + - check + - bank_transfer + - ach_credit + - sepa_credit + - boleto + - us_automated_bank_transfer + - eu_automated_bank_transfer + - uk_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + - custom + is_not: + type: string + description: | + \* \`no_preference\` - No Preference \* \`cash\` - Cash \* \`check\` - Check \* \`bank_transfer\` - Bank Transfer \* \`ach_credit\` - ACH Credit \* \`sepa_credit\` - SEPA Credit \* \`boleto\` - Boleto \* \`us_automated_bank_transfer\` - US Automated Bank Transfer \* \`eu_automated_bank_transfer\` - EU Automated Bank Transfer \* \`uk_automated_bank_transfer\` - UK Automated Bank Transfer \* \`jp_automated_bank_transfer\` - JP Automated Bank Transfer \* \`mx_automated_bank_transfer\` - MX Automated Bank Transfer \* \`custom\` - Custom + enum: + - no_preference + - cash + - check + - bank_transfer + - ach_credit + - sepa_credit + - boleto + - us_automated_bank_transfer + - eu_automated_bank_transfer + - uk_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + - custom + in: + pattern: "^\\[(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom)(,(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom)(,(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom))*\\\ + ]$" + type: string + example: cash + deprecated: false + - name: auto_close_invoices + in: query + description: "optional, boolean filter
Set\ + \ to false to override for this subscription, the site-level setting for\ + \ auto-closing invoices. Only applicable when auto-closing invoices has\ + \ been enabled for the site. This attribute has a higher precedence than\ + \ the same attribute at the customer level. Possible values are : true, false
Supported\ + \ operators : is

Example \ + \ auto_close_invoices[is] = \"true\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + example: "true" + deprecated: false + - name: override_relationship + in: query + description: "optional, boolean filter
If\ + \ true, ignores the hierarchy relationship and uses customer as payment and invoice owner.\ + \ Possible values are : true, false
Supported operators : is

Example\ + \ override_relationship[is]\ + \ = \"false\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + example: "false" + deprecated: false + - name: sort_by + in: query + description: "optional, string filter
Sorts\ + \ based on the specified attribute.
Supported attributes : created_at,\ + \ updated_at
Supported sort-orders : asc, desc

Example\ + \ sort_by[asc] = \"created_at\"\ +
This will sort the result based on the 'created_at' attribute in\ + \ ascending(earliest first) order." + required: false + style: deepObject + explode: true + schema: + minProperties: 1 + type: object + properties: + asc: + type: string + enum: + - created_at + - updated_at + desc: + type: string + enum: + - created_at + - updated_at + additionalProperties: false + - name: business_entity_id + in: query + description: "optional, string filter
The\ + \ unique ID of the \nbusiness entity of this subscription. This is always the same as the\ + \ \nbusiness entity of the customer. \n
Supported operators : is, is_not, starts_with

Example\ + \ business_entity_id[is_not]\ + \ = \"business_entity_id\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + example: business_entity_id + deprecated: false + - name: channel + in: query + description: "optional, enumerated string filter
The\ + \ subscription channel this object originated from and is maintained in.\ + \ Possible values are : web, app_store, play_store.
Supported\ + \ operators : is, is_not, in, not_in

Example channel[is_not] = \"APP STORE\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: "\\* \\`web\\` - The object was created (and is maintained)\ + \ for the web channel directly in Chargebee via API or UI. \\* \\\ + `app_store\\` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this object via\ + \ UI or API is disallowed. \\* \\`play_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of this object\ + \ via UI or API is disallowed. \n\nIn-App Subscriptions is currently\ + \ in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com)\ + \ for more information.\n" + enum: + - web + - app_store + - play_store + is_not: + type: string + description: "\\* \\`web\\` - The object was created (and is maintained)\ + \ for the web channel directly in Chargebee via API or UI. \\* \\\ + `app_store\\` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this object via\ + \ UI or API is disallowed. \\* \\`play_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of this object\ + \ via UI or API is disallowed. \n\nIn-App Subscriptions is currently\ + \ in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com)\ + \ for more information.\n" + enum: + - web + - app_store + - play_store + in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + example: APP STORE + deprecated: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - customer + - subscription + type: object + properties: + subscription: + $ref: '#/components/schemas/Subscription' + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/move: + post: + summary: Move a subscription + description: "Moves a subscription from one [customer](customers?prod_cat_ver=2)\ + \ to another asynchronously. All related resources such as [unbilled_charge](unbilled_charges?prod_cat_ver=2),\ + \ [invoice](invoices?prod_cat_ver=2), [credit_note](credit_notes?prod_cat_ver=2),\ + \ and [transaction](transactions?prod_cat_ver=2) are also moved to the new\ + \ customer.\n\nAfter moving, Chargebee adds a [comment](comments?prod_cat_ver=2)\ + \ to the original `customer` resource to document the move, including the\ + \ [to_customer_id](subscriptions?prod_cat_ver=2#move_a_subscription_to_customer_id)\ + \ and the `id`s of all the resources transferred to the destination customer.\ + \ \n**Warning**\n\n* If [auto_collection](subscriptions?prod_cat_ver=2#create_subscription_for_items_auto_collection)\ + \ is `on`, it might fail after this operation. Refer to the warning in [copy_payment_source](subscriptions?prod_cat_ver=2#move_a_subscription_copy_payment_source)\ + \ for details.\n* During the time that it takes for the operation to complete,\ + \ no modifications are allowed on the source customer, the destination customer,\ + \ and the subscription.\n* After moving a subscription, the change does not\ + \ reflect in Chargebee Billing's [accounting integrations](https://www.chargebee.com/docs/2.0/finance-integration-index.html)\ + \ or in [Chargebee RevRec](https://www.chargebee.com/docs/revrec/chargebee-billing-features.html).\ + \ \n\n### More details {#move-more}\n\n#### Prerequisites {#move-prerequisites}\n\ + \n* The subscription should not be part of a `customer` resource that is within\ + \ an account hierarchy [relationship](https://apidocs.chargebee.com/docs/api/customers?lang=curl#customer_relationship).\n\ + * There must be no invoices with the [statuses](invoices?prod_cat_ver=2#invoice_status)\ + \ `payment_due`, `pending`, or `posted` associated with the subscription.\n\ + * The site must have [consolidated invoicing](https://www.chargebee.com/docs/2.0/consolidated-invoicing.html)\ + \ disabled.\n* There should be no consolidated invoices linked to the subscription.\n\ + * No `credit_note` resources with the [statuses](credit_notes?prod_cat_ver=2#credit_note_status)\ + \ `adjusted` or `refund_due` should be associated with the subscription.\n\ + * The site must have [multi business entity](https://www.chargebee.com/docs/2.0/mbe.html)\ + \ disabled.\n\n#### Asynchronous operation {#move-async}\n\nIf the above prerequisites\ + \ are met, the API call returns a `200 OK` response containing the `subscription`\ + \ resource as is. However, the actual move operation can take up to **five**\ + \ minutes to complete.\n\nTo know whether the operation was successful, we\ + \ recommend that you watch for the [subscription_changed](events?prod_cat_ver=2#subscription_changed)\ + \ event and see if `subscription.customer_id` has changed.\n\n#### Limitations\ + \ {#move-limitations}\n\n* Subscriptions cannot be moved on the same calendar\ + \ day as their renewal. For instance, if a renewal is scheduled for 2 PM on\ + \ April 10, 2024, the endpoint is restricted from 12 AM on April 10, 2024,\ + \ until the renewal is completed.\n* After moving a subscription, the change\ + \ does not reflect in Chargebee Billing's [accounting integrations](https://www.chargebee.com/docs/2.0/finance-integration-index.html)\ + \ or in [Chargebee RevRec](https://www.chargebee.com/docs/revrec/chargebee-billing-features.html).\n\ + \n**Note** : Resources linked to the original customer such as `unbilled_charge`,\ + \ `invoice`, `credit_note`, and `transaction` but **not** linked to the subscription\ + \ being moved, are **not** moved to the destination customer by this operation.\n" + operationId: move_a_subscription + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(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fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - to_customer_id + type: object + properties: + to_customer_id: + maxLength: 50 + type: string + description: "Specifies the unique ID of the `customer` resource\ + \ to which the subscription will be moved. \n**Note** : If there\ + \ are [multiple business entities](advanced-features?prod_cat_ver=2#mbe),\ + \ the `customer.business_entity_id` of the destination customer\ + \ must match the `subscription.business_entity_id`.\n" + deprecated: false + copy_payment_source: + type: boolean + description: "**When `true`:**\n\nIf the subscription has an [associated\ + \ `payment_source`](subscriptions?prod_cat_ver=2#subscription_payment_source_id):\n\ + \n1. A new duplicate copy of the `payment_source` resource is\ + \ created.\n2. This new copy of the payment source is linked to\ + \ the subscription and the destination customer.\n\n**Note** :\ + \ Deleting any copy of the `payment_source` also deletes the other\ + \ copies and the details stored at the payment gateway.\n\n**When\ + \ `false`:**\n\nNo new payment source is created for the subscription.\ + \ Moreover, if a `payment_source` is already [linked](subscriptions?prod_cat_ver=2#subscription_payment_source_id)\ + \ to the subscription, it gets removed, meaning the `subscription.payment_source_id`\ + \ is cleared. \n**Warning** : When `copy_payment_source` is `false`\ + \ and if [subscription.auto_collection](subscriptions?prod_cat_ver=2#create_subscription_for_items_auto_collection)\ + \ is enabled, auto-collection will fail, in turn preventing subscription\ + \ renewal. To prevent auto-collection failure, [link a payment\ + \ source](subscriptions?prod_cat_ver=2#override_billing_profile)\ + \ to the subscription after this operation.\n" + deprecated: false + default: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - subscription + type: object + properties: + subscription: + $ref: '#/components/schemas/Subscription' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/import_for_items: + post: + summary: Import subscription for Items + description: | + Imports a subscription into Chargebee. + operationId: import_subscription_for_items + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - status + type: object + properties: + id: + maxLength: 50 + type: string + description: | + A unique and immutable identifier for the subscription. If not provided, it is autogenerated. + deprecated: false + trial_end: + pattern: "^[0-9]{10}$" + type: integer + description: | + End of the trial period for the subscription. This overrides the trial period set for the plan-item. The value must be later than `start_date`. Set it to `0` to have no trial period. + format: unix-time + deprecated: false + billing_cycles: + minimum: 0 + type: integer + description: | + The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles [set for the plan-item price](https://apidocs.chargebee.com/docs/api/item_prices?prod_cat_ver=2#item_price_billing_cycles) is used. + format: int32 + deprecated: false + net_term_days: + type: integer + description: | + Defines [Net D](https://www.chargebee.com/docs/net_d.html) for the subscription. Net D is the number of days within which any invoice raised for the subscription must be paid. + + * If a value is provided: Net D is set explicitly for the subscription to the value provided. The value must be one among those defined in the [site configuration](https://www.chargebee.com/docs/net_d.html#enable-net-d-for-chargebee-invoices). + * If not provided: The attribute is not set and therefore not returned by the API. In this case, when an invoice is raised -- whether now or later -- the `net_term_days` defined at the [customer level](customers#customer_net_term_days) is considered. + . + format: int32 + deprecated: false + start_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The date/time at which the subscription is to start or has started. If not provided, the subscription starts immediately. + format: unix-time + deprecated: false + auto_collection: + type: string + description: | + Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property. \* on - Whenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available. \* off - Automatic collection of charges will not be made for this subscription. Use this for offline payments. + deprecated: false + enum: + - "on" + - "off" + po_number: + maxLength: 100 + type: string + description: | + Purchase order number for this subscription. + deprecated: false + coupon_ids: + type: array + description: | + List of coupons to be applied to this subscription. You can provide coupon ids or [coupon codes](./coupon_codes). + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + payment_source_id: + maxLength: 40 + type: string + description: | + Id of the payment source to be attached to this subscription. + deprecated: false + status: + type: string + description: | + Current state of the subscription. \* future - The subscription is scheduled to start at a future date. \* active - The subscription is active and will be charged for automatically based on the items in it. \* cancelled - The subscription has been canceled and is no longer in service. \* transferred - The subscription has been transferred to another business entity within the organization. \* in_trial - The subscription is in trial. \* non_renewing - The subscription will be canceled at the end of the current term. \* paused - The subscription is [paused](https://www.chargebee.com/docs/2.0/pause-subscription.html). The subscription will not renew while in this state. + deprecated: false + enum: + - future + - in_trial + - active + - non_renewing + - paused + - cancelled + - transferred + current_term_end: + pattern: "^[0-9]{10}$" + type: integer + description: | + End of the current billing term. Subscription is renewed immediately after this. If not given, this will be calculated based on plan billing cycle. + + + + **Note:** + + + For subscription status: `non_renewing`, `active`, and `paused`, `current_term_end` is required. + + + + . + format: unix-time + deprecated: false + current_term_start: + pattern: "^[0-9]{10}$" + type: integer + description: | + Start of the current billing period of the subscription. This is required when the subscription `status` is `paused`. When the `status` is `active` or `non_renewing`, it defaults to the current time. + format: unix-time + deprecated: false + trial_start: + pattern: "^[0-9]{10}$" + type: integer + description: | + Start of the trial period for the subscription. When not passed, it is assumed to be current time. When passed for a `future` subscription, it implies that the subscription goes into `in_trial` when it starts. + format: unix-time + deprecated: false + cancelled_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + Time at which subscription was cancelled or is set to be cancelled. + format: unix-time + deprecated: false + started_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + Time at which the subscription was started. Is `null` for `future`subscriptions as it is yet to be started. + format: unix-time + deprecated: false + activated_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + The time at which the subscription was activated. A subscription is "activated" when its `status` changes from any other, to either `active` or `non_renewing`. + + The following conditions must be satisfied when passing this parameter: + + * When `status` is `active`, `non_renewing`, or `paused`, `activated_at` must be on or after `trial_end` or `started_at`. Additionally, `activated_at` must be on or before `current_term_start`. + * When `status` is `in_trial`, `activated_at` must precede `trial_start` + + #### Note: + + This parameter should not be provided when passing `status` as `future` or `cancelled`. + format: unix-time + deprecated: false + pause_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + When a pause has been scheduled, it is the date/time of scheduled pause. When the subscription is in the `paused` state, it is the date/time when the subscription was paused. + format: unix-time + deprecated: false + resume_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + For a paused subscription, it is the date/time when the subscription is scheduled to resume. If the pause is for an indefinite period, this value is not returned. + format: unix-time + deprecated: false + contract_term_billing_cycle_on_renewal: + maximum: 100 + minimum: 1 + type: integer + description: | + Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles` or a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms). + format: int32 + deprecated: false + create_current_term_invoice: + type: boolean + description: "Set as `true` if you want an invoice to be created\ + \ for the subscription. \n\n* The invoice will be created for\ + \ the subscription only if it has an `active` or `non_renewing`\ + \ status.\n* The period of the invoice is from `current_term_start`\ + \ to `current_term_end`.\n* The invoice will not be generated\ + \ if the subscription amount is zero dollars (for that period)\ + \ and 'Hide Zero Value Line Items' option is enabled in site settings.\n" + deprecated: false + default: false + invoice_notes: + maxLength: 2000 + type: string + description: | + A customer-facing note added to all invoices associated with this subscription. This note is one among [all the notes](/docs/api/invoices#invoice_notes) displayed on the invoice PDF. + deprecated: false + meta_data: + type: object + additionalProperties: true + description: | + A set of key-value pairs stored as additional information for the subscription. \[Learn more\](./#meta_data). + deprecated: false + cancel_reason_code: + maxLength: 100 + type: string + description: | + Reason code for canceling the subscription. Must be one from a list of reason codes set in the Chargebee app in **Settings \> Configure Chargebee \> Reason Codes \> Subscriptions \> Subscription Cancellation**. Must be passed if set as mandatory in the app. The codes are case-sensitive. + deprecated: false + create_pending_invoices: + type: boolean + description: | + Indicates whether the invoices for this subscription are generated with a `pending` `status`. This attribute is set to `true` automatically when the subscription has item prices that belong to `metered` items. + + You can also set this to `true` explicitly using the [create](/docs/api/subscriptions#create_subscription_for_items_create_pending_invoices)/[update](/docs/api/subscriptions#update_subscription_for_items_create_pending_invoices) subscription operations. This is useful in the following scenarios: + + * When tracking usages and calculating usage-based charges on your end. You can then add them to the subscription as a [one-time charge](https://www.chargebee.com/docs/charges.html) at the end of the billing term. + * When you need to inspect all charges before closing invoices for this subscription. + + Applicable only when [Metered Billing](https://www.chargebee.com/docs/metered_billing.html) is enabled for the site + . + deprecated: false + auto_close_invoices: + type: boolean + description: | + Set to `false` to override for this subscription, the [site-level setting](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing) for auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute has a higher precedence than the same attribute at the [customer level](/docs/api/customers?prod_cat_ver=2#customer_auto_close_invoices). + deprecated: false + contract_term: + type: object + properties: + id: + maxLength: 50 + type: string + description: | + Id that uniquely identifies the contract term in the site. + deprecated: false + created_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + The date when the contract term was created. + format: unix-time + deprecated: false + contract_start: + pattern: "^[0-9]{10}$" + type: integer + description: | + The start date of the contract term + format: unix-time + deprecated: false + billing_cycle: + minimum: 0 + type: integer + description: | + The number of billing cycles of the subscription that the contract term is for. + format: int32 + deprecated: false + total_amount_raised: + minimum: 0 + type: integer + description: | + The amount raised for the contract term till the time of importing the subscription. This amount is added to the [total_contract_value](contract_terms#contract_term_total_contract_value) + format: int64 + deprecated: false + default: 0 + total_amount_raised_before_tax: + minimum: 0 + type: integer + description: | + The amount raised for the contract term till the time of importing the subscription excluding tax. This amount is added to the [total_contract_value_before_tax](contract_terms#contract_term_total_contract_value) + format: int64 + deprecated: false + default: 0 + action_at_term_end: + type: string + description: |+ + Action to be taken when the contract term completes. \* evergreen - Contract term completes and the subscription renews. \* renew - + * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](subscriptions#create_subscription_for_customer_contract_term_billing_cycle_on_renewal). + * The `action_at_term_end` for the new contract term is set to `renew`. + \* renew_once - Used when you want to renew the contract term just once. Does the following: + * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](subscriptions#create_subscription_for_customer_contract_term_billing_cycle_on_renewal). + * The `action_at_term_end` for the new contract term is set to `cancel`. + \* cancel - Contract term completes and subscription is canceled. + + deprecated: false + default: renew + enum: + - renew + - evergreen + - cancel + - renew_once + cancellation_cutoff_period: + type: integer + description: | + The number of days before [`contract_end`](contract_terms#contract_term_contract_end), during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure + format: int32 + deprecated: false + default: 0 + description: | + Parameters for contract_term + deprecated: false + transaction: + type: object + properties: + amount: + minimum: 1 + type: integer + description: | + The payment transaction amount. This parameter should be passed only if the invoice is created for current term. + format: int64 + deprecated: false + payment_method: + type: string + description: | + The payment method of this transaction. This parameter should be passed only if the invoice is created for current term. \* cash - Cash \* alipay - Alipay \* sofort - Sofort \* direct_debit - Direct Debit \* netbanking_emandates - netbanking_emandates \* klarna_pay_now - Klarna Pay Now \* paypal_express_checkout - Paypal Express Checkout \* automated_bank_transfer - Automated Bank Transfer \* venmo - Venmo \* bancontact - Bancontact \* custom - Custom \* upi - upi \* unionpay - Unionpay \* apple_pay - Apple Pay \* wechat_pay - WeChat Pay \* card - Card \* boleto - boleto \* pay_to - PayTo \* ideal - IDEAL \* check - Check \* sepa_instant_transfer - Sepa Instant Transfer \* sepa_credit - SEPA Credit \* ach_credit - ACH Credit \* faster_payments - Faster Payments \* bank_transfer - Bank Transfer \* chargeback - Only applicable for a transaction of [type](transactions#transaction_type) = `refund`. This value is set by Chargebee when an automated [chargeback](https://www.chargebee.com/docs/chargeback.html#chargeback-process) occurs. You can also set this explicitly when [recording a refund](transactions#record_an_offline_refund). \* dotpay - Dotpay \* amazon_payments - Amazon Payments \* google_pay - Google Pay \* other - Payment Methods other than the above types \* giropay - giropay + deprecated: false + enum: + - cash + - check + - bank_transfer + - other + - custom + reference_number: + maxLength: 100 + type: string + description: | + The reference number for this transaction. For example, check number in case of `check` `payment_method`. This parameter should be passed only if the invoice is created for current term. + deprecated: false + date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The date of occurence of the transaction. This parameter should be passed only if the invoice is created for current term. + format: unix-time + deprecated: false + description: | + Parameters for transaction + deprecated: false + shipping_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for shipping_address + deprecated: false + subscription_items: + required: + - item_price_id + type: object + properties: + item_price_id: + type: array + description: | + The unique identifier of the item price. + items: + maxLength: 100 + type: string + deprecated: false + quantity: + type: array + description: | + The quantity of the item purchased + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + unit_price: + type: array + description: | + The price/per unit price of the item. When not provided, [the value set](/docs/api/item_prices?prod_cat_ver=2#item_price_attributes) for the item price is used. This is only applicable when the `pricing_model` of the item price is `flat_fee` or `per_unit`. Also, it is only allowed when [price overriding](https://www.chargebee.com/docs/price-override.html) is enabled for the site. The value depends on the type of currency. If `changes_scheduled_at` is in the past and a `unit_price` is not passed, then the item price's current unit price is considered even if the item price did not exist on the date as of when the change is scheduled. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + unit_price_in_decimal: + type: array + description: | + When [price overriding](https://www.chargebee.com/docs/2.0/price-override.html) is enabled for the site, the price or per-unit price of the item can be set here. The [value set for the item price](https://apidocs.chargebee.com/docs/api/item_prices#item_price_price) is used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + billing_cycles: + type: array + description: "For the plan-item price: \nthe value determines\ + \ the number of billing cycles the subscription runs before\ + \ canceling automatically. If not provided, then [the value\ + \ set](./item_prices?prod_cat_ver=2#item_price_attributes)\ + \ for the plan-item price is used. \n\nFor addon-item prices:\ + \ \nIf [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html)\ + \ are enabled then this is the number of subscription billing\ + \ cycles for which the addon is included. If not provided,\ + \ then [the value set under attached addons](./attached_items?prod_cat_ver=2#attached_item_attributes)\ + \ is used. Further, if that value is not provided, then [the\ + \ value set for the addon-item price](./item_prices?prod_cat_ver=2#item_price_attributes)\ + \ is used.\n" + items: + minimum: 0 + type: integer + format: int32 + deprecated: false + trial_end: + type: array + description: | + The date/time when the trial period of the item ends. Applies to plan-items and----when [enabled](https://www.chargebee.com/docs/2.0/addons-trial.html)----addon-items as well. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + service_period_days: + type: array + description: | + The service period of the item in days from the day of charge. + items: + maximum: 730 + minimum: 1 + type: integer + format: int32 + deprecated: false + charge_on_event: + type: array + items: + type: string + description: | + When `charge_on_option` option is set to `on_event`, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items. \* contract_termination - when a contract term is [terminated](./subscriptions?prod_cat_ver=2#cancel_subscription_for_items_contract_term_cancel_option). \* subscription_trial_start - the time when the trial period of the subscription begins. \* plan_activation - same as subscription activation, but also includes the case when the plan-item of the subscription is changed. \* subscription_activation - the moment a subscription enters an `active` or `non-renewing` state. Also includes reactivations of canceled subscriptions. \* subscription_creation - the time of creation of the subscription. + deprecated: false + enum: + - subscription_creation + - subscription_trial_start + - plan_activation + - subscription_activation + - contract_termination + charge_once: + type: array + description: | + Indicates if the charge-item is to be charged only once or each time the `charge_on_event` occurs. This parameter only applies to charge-items. + items: + type: boolean + deprecated: false + description: | + Parameters for subscription_items + deprecated: false + discounts: + required: + - apply_on + - duration_type + type: object + properties: + apply_on: + type: array + items: + type: string + description: | + The amount on the invoice to which the discount is applied. \* invoice_amount - The discount is applied to the invoice `sub_total`. \* specific_item_price - The discount is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id`. + deprecated: false + enum: + - invoice_amount + - specific_item_price + duration_type: + type: array + items: + type: string + description: | + Specifies the time duration for which this discount is attached to the subscription. \* forever - The discount is attached to the subscription and applied on the invoices till it is [explicitly removed](/docs/api/subscriptions?prod_cat_ver=2#update_subscription_for_items_discounts_operation_type). \* limited_period - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period` and `period_unit`. \* one_time - The discount stays attached to the subscription till it is applied on an invoice **once**. It is removed after that from the subscription. + deprecated: false + default: forever + enum: + - one_time + - forever + - limited_period + percentage: + type: array + description: | + The percentage of the original amount that should be deducted from it. Only applicable when `discount.type` is percentage. + items: + maximum: 100 + minimum: 0.01 + type: number + format: double + deprecated: false + amount: + type: array + description: | + The value of the discount. [The format of this value](https://apidocs.chargebee.com/docs/api?prod_cat_ver=2#currencies) depends on the kind of currency. This is only applicable when `discount.type` is `fixed_amount`. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + period: + type: array + description: | + The duration of time for which the discount is attached to the subscription, in `period_units`. Applicable only when `duration_type` is `limited_period`. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + period_unit: + type: array + items: + type: string + description: | + The unit of time for `period`. Applicable only when `duration_type` is `limited_period`. \* day - A period of 24 hours. \* week - A period of 7 days. \* month - A period of 1 calendar month. \* year - A period of 1 calendar year. + deprecated: false + enum: + - day + - week + - month + - year + included_in_mrr: + type: array + description: | + The discount is included in MRR calculations for your site. This attribute is only applicable when `duration_type` is `one_time` and when the [feature is enabled](https://www.chargebee.com/docs/reporting.html#dashboards_flexible-mrr-calculation) in Chargebee. Also, If the [site-level setting](https://www.chargebee.com/docs/reporting.html#chart_flexible-mrr-calculation) is to exclude one-time discounts from MRR calculations, this value is always returned `false`. + items: + type: boolean + deprecated: false + item_price_id: + type: array + description: | + The [id of the item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) in the subscription to which the discount is to be applied. Relevant only when `apply_on` = `specific_item_price`. + items: + maxLength: 100 + type: string + deprecated: false + description: | + Parameters for discounts + deprecated: false + charged_items: + type: object + properties: + item_price_id: + type: array + description: | + A unique ID for your system to identify the item price. + items: + maxLength: 100 + type: string + deprecated: false + last_charged_at: + type: array + description: | + Timestamp indicating when this charge item_price was last charged for this subscription. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + description: | + Parameters for charged_items + deprecated: false + item_tiers: + type: object + properties: + item_price_id: + type: array + description: | + The id of the item price for which the tier price is being overridden. + items: + maxLength: 100 + type: string + deprecated: false + starting_unit: + type: array + description: | + The lowest value in the quantity tier. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + ending_unit: + type: array + description: | + The highest value in the quantity tier. + items: + type: integer + format: int32 + deprecated: false + price: + type: array + description: | + The overridden price of the tier. The value depends on the [type of currency](./#handling_currency_units). + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + default: 0 + starting_unit_in_decimal: + type: array + description: | + The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal` of the next lower tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + ending_unit_in_decimal: + type: array + description: | + The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal` of the next higher tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + price_in_decimal: + type: array + description: | + The decimal representation of the per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. When the `pricing_model` is `stairstep`, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: | + Parameters for item_tiers + deprecated: false + additionalProperties: true + encoding: + charged_items: + style: deepObject + explode: true + contract_term: + style: deepObject + explode: true + discounts: + style: deepObject + explode: true + item_tiers: + style: deepObject + explode: true + shipping_address: + style: deepObject + explode: true + subscription_items: + style: deepObject + explode: true + transaction: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - subscription + type: object + properties: + subscription: + $ref: '#/components/schemas/Subscription' + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + invoice: + $ref: '#/components/schemas/Invoice' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/retrieve_advance_invoice_schedule: + get: + summary: Retrieve advance invoice + description: | + **Caution** + + This API cannot be used for subscriptions that have [ramp](ramps?prod_cat_ver=2)s. + + Retrieves the *advance_invoice_schedule* for a subscription. Note that this endpoint is only applicable for *schedule_type = specific_dates* or fixed_intervals. + operationId: retrieve_advance_invoice + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]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?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - advance_invoice_schedules + type: object + properties: + advance_invoice_schedules: + type: array + items: + $ref: '#/components/schemas/AdvanceInvoiceSchedule' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/remove_scheduled_cancellation: + post: + summary: Remove scheduled cancellation + description: | + **Note:** Cannot be called when the subscription is on a [contract term](contract_terms). (That is, when the `contract_term.status attribute` is `active`.) + + If the subscription is in **Non Renewing** or **In Trial** state and is also scheduled to cancel at the end of current term, then this API can be used to remove the scheduled cancellation. When a scheduled cancellation is removed, the subscription will revert to **Active** or **In Trial** state, whichever is the state before cancellation was scheduled. + + While removing the scheduled cancellation, you may specify the number of billing cycles. If the billing cycle is not specified, the default billing cycle from the plan will be applied on the subscription. + operationId: remove_scheduled_cancellation + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + billing_cycles: + minimum: 0 + type: integer + description: | + Number of cycles(plan interval) this subscription should be charged. After the billing cycles exhausted, the subscription will be cancelled. + format: int32 + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - subscription + type: object + properties: + subscription: + $ref: '#/components/schemas/Subscription' + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/retrieve_with_scheduled_changes: + get: + summary: Retrieve with scheduled changes + description: "**Caution**\n\nThis API cannot be used for subscriptions that\ + \ have [ramp](ramps?prod_cat_ver=2)s.\n\nRetrieves a subscription with the\ + \ scheduled changes applied. \n**Note:** Only the following attributes are\ + \ changed\n\n* item_id\n* item_price_id\n* billing_period\n* billing_period_unit\n\ + * remaining_billing_cycles\n* coupons\n\nOther attributes such as **status**\ + \ ,**next_billing_at** are not changed and will reflect the current subscription\ + \ values.\n\n\n\n" + operationId: retrieve_with_scheduled_changes + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(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fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - subscription + type: object + properties: + subscription: + $ref: '#/components/schemas/Subscription' + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/reactivate: + post: + summary: Reactivate a subscription + description: "**Note:** This operation optionally supports 3DS verification\ + \ flow. To achieve the same, create the [Payment Intent](/docs/api/#3ds-implementation-guide)\ + \ and pass it as input parameter to this API.\n\nThis API is used to reactivate\ + \ a **cancelled** subscription. You may also optionally specify a trial end\ + \ date, to move the subscription to **In Trial** state. If trial end is not\ + \ specified, the subscription will be activated and any applicable charges\ + \ will be initiated.\n\nUnless the billing cycle is specified, it will be\ + \ set to plan's default billing cycle.\n\nDuring an in-term reactivation^++^,\ + \ unless the billing cycle is specified, the subscription's remaining billing\ + \ cycles will be restored. If a trial end date is specified, then the plan's\ + \ default billing cycle is used.\n\n**What is an \"in-term reactivation\"\ + ?** \nAn \"in-term reactivation\" happens when the billing term of the subscription\ + \ is retained upon cancellation and reactivation is initiated within that\ + \ term. \n\n**When is the 'billing term' retained for a cancelled subscription?**\ + \ \nWhen dunning (payment failure retry settings) is configured with the\ + \ last retry configured as\n\n* cancel subscription and mark invoice as 'Not\ + \ Paid', or\n* cancel subscription and mark the invoice as 'Voided' and the\ + \ case if any of the current term invoices is partially or fully paid, the\ + \ invoice is not voided but instead Chargebee marks the invoices as 'Not Paid'.\n\ + \n\n\n**Note :** In both cases, the billing term is retained and upon reactivation\ + \ the subscription will be moved to active state (if the plan does not have\ + \ a trial period) and no invoice will be generated. Ensure that you collect\ + \ any unpaid invoices. \n\n**Example :** A Subscription was billed from\ + \ 1st to 31st of a month and it was cancelled on the 20th due to one of the\ + \ above cases (billing term is not reset). If the reactivation happens on\ + \ 25th then it is considered an in-term reactivation.\n" + operationId: reactivate_a_subscription + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-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:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + trial_end: + pattern: "^[0-9]{10}$" + type: integer + description: | + Providing this parameter indicates that the subscription reactivates with an `in_trial` `status` and the trial period ends at the date provided. The value must not be earlier than `reactivate_from`. Note: This parameter can be backdated (set to a value in the past) only when `reactivate_from` has been backdated. Do this to keep a record of when the trial ended in case it ended at some point in the past. When `trial_end` is backdated, the subscription immediately goes into `active` or `non_renewing` status. + format: unix-time + deprecated: false + billing_cycles: + minimum: 0 + type: integer + description: | + Number of cycles(plan interval) this subscription should be charged. After the billing cycles exhausted, the subscription will be cancelled. + format: int32 + deprecated: false + reactivate_from: + pattern: "^[0-9]{10}$" + type: integer + description: | + The date/time at which the subscription was reactivated. When not provided, the subscription is reactivated immediately on calling this API. The value of this parameter must always be in the past (backdating). Do this when the subscription has already been reactivated and the billing has been delayed. The following prerequisites must be met for this parameter to be passed: + + * The backdating feature has been enabled for subscription reactivation operations. + * The current day of the month does not exceed the limit set in Chargebee for backdating such operations. This day is the day of the month by which the accounting for the previous month must be closed. + * The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `reactivate_from` cannot be earlier than 14th February. + . + format: unix-time + deprecated: false + invoice_immediately: + type: boolean + description: "If there are charges raised immediately for the subscription,\ + \ this parameter specifies whether those charges are to be invoiced\ + \ immediately or added to [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html).\ + \ The default value is as per the [site settings](https://www.chargebee.com/docs/unbilled-charges.html#configuration).\ + \ \n**Note:** `invoice_immediately` only affects charges that\ + \ are raised at the time of execution of this API call. Any charges\ + \ scheduled to be raised in the future are not affected by this\ + \ parameter. .\n" + deprecated: false + billing_alignment_mode: + type: string + description: | + Applicable when calendar billing is enabled and a new *active* term gets started during this operation. Unless specified the configured *default* value will be used. \* delayed - Subscription period will be aligned with the configured billing date at the next renewal. \* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly.. + deprecated: false + enum: + - immediate + - delayed + terms_to_charge: + minimum: 1 + type: integer + description: | + The number of subscription billing cycles to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html). If a new term is started for the subscription due to this API call, then `terms_to_charge` is inclusive of this new term. See description for the `force_term_reset` parameter to learn more about when a subscription term is reset. + format: int32 + deprecated: false + invoice_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The document date displayed on the invoice PDF. The default value is the current date. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. Moreover, if `create_pending_invoices` is `true`, and if the site is configured to set invoice dates to the date of closing, then upon invoice closure, this date is changed to the invoice closing date. `taxes` and `line_item_taxes` are computed based on the tax configuration as of `invoice_date`. When passing this parameter, the following prerequisites must be met: + + * `invoice_date` must be in the past. + * `invoice_date` is not more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December. + * It is not earlier than `reactivate_from` or `trial_end`. + * `invoice_immediately` is `true`. + . + format: unix-time + deprecated: false + contract_term_billing_cycle_on_renewal: + maximum: 100 + minimum: 1 + type: integer + description: | + Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles` or a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms). + format: int32 + deprecated: false + payment_initiator: + type: string + description: | + The type of initiator to be used for the payment request triggered by this operation. \* customer - Pass this value to indicate that the request is initiated by the customer \* merchant - Pass this value to indicate that the request is initiated by the merchant + deprecated: false + enum: + - customer + - merchant + contract_term: + type: object + properties: + action_at_term_end: + type: string + description: |+ + Action to be taken when the contract term completes. \* evergreen - Contract term completes and the subscription renews. \* cancel - Contract term completes and subscription is canceled. \* renew - + * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](subscriptions#create_subscription_for_customer_contract_term_billing_cycle_on_renewal). + * The `action_at_term_end` for the new contract term is set to `renew`. + + deprecated: false + enum: + - renew + - evergreen + - cancel + cancellation_cutoff_period: + type: integer + description: | + The number of days before [`contract_end`](contract_terms#contract_term_contract_end), during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure + format: int32 + deprecated: false + default: 0 + description: | + Parameters for contract_term + deprecated: false + statement_descriptor: + type: object + properties: + descriptor: + maxLength: 65000 + type: string + deprecated: false + deprecated: false + payment_intent: + type: object + properties: + id: + maxLength: 150 + type: string + description: | + Identifier for PaymentIntent generated by Chargebee.js. Applicable only when you are using Chargebee.js for completing the 3DS flow. The PaymentIntent should be in 'authorized' state while passing it here. You need not pass other PaymentIntent parameters if this is passed. + deprecated: false + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account used for performing the 3DS flow. + deprecated: false + gw_token: + maxLength: 65000 + type: string + description: | + Identifier for 3DS transaction/verification object at the gateway. Can be passed only after successfully completing the 3DS flow. Refer [3DS implementation in Chargebee](/docs/api/3ds_card_payments#3ds-gateway-side-implementation) to find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow. + deprecated: false + payment_method_type: + type: string + description: | + The list of payment method types (For example, card, ideal, sofort, bancontact, etc.) this Payment Intent is allowed to use. If payment method type is empty, Card is taken as the default type for all gateways except Razorpay. \* giropay - giropay \* paypal_express_checkout - paypal_express_checkout \* card - card \* venmo - Venmo \* klarna_pay_now - Klarna Pay Now \* sofort - sofort \* amazon_payments - Amazon Payments \* netbanking_emandates - netbanking_emandates \* dotpay - dotpay \* ideal - ideal \* faster_payments - Faster Payments \* upi - upi \* direct_debit - direct_debit \* sepa_instant_transfer - Sepa Instant Transfer \* bancontact - bancontact \* pay_to - PayTo \* boleto - boleto \* google_pay - google_pay \* apple_pay - apple_pay + deprecated: false + enum: + - card + - ideal + - sofort + - bancontact + - google_pay + - dotpay + - giropay + - apple_pay + - upi + - netbanking_emandates + - paypal_express_checkout + - direct_debit + - boleto + - venmo + - amazon_payments + - pay_to + - faster_payments + - sepa_instant_transfer + - klarna_pay_now + reference_id: + maxLength: 65000 + type: string + description: | + Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow. + deprecated: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`checkout_com\`: While adding a new payment method using \[permanent token\](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, \`document\` ID and \`country_of_residence\` are required to support payments through \[dLocal\](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). \* \`payer\`: User related information. \* \`country_of_residence\`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a \[two-character ISO code\](https://docs.checkout.com/resources/codes/country-codes). \* \`document\`: Document ID is the user's \[identification number\](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. \* \`bluesnap\`: While passing raw card details to BlueSnap, if \`fraud_session_id\` is added, \[additional validation\](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your \[BlueSnap fraud session ID\](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. \* \`braintree\`: While passing raw card details to Braintree, your \`fraud_merchant_id\` and the user's \`device_session_id\` can be added to perform \[additional validation\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`fraud_merchant_id\`: Your \[merchant ID\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. \* \`chargebee_payments\`: While passing raw card details to Chargebee Payments, if \`fraud_session_id\` is added, additional validation is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. \* \`bank_of_america\`: While passing raw card details to Bank of America, your user's \`device_session_id\` can be added to perform additional validation and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`ecentric\`: This parameter is used to verify and process payment method details in Ecentric. If the \`merchant_id\` parameter is included, Chargebee will vault it / perform a lookup and verification against this \`merchant_id\`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. \* \`merchant_id\`: Merchant GUID where the card is vaulted or need to be vaulted. \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries and \`device_session_id\` can be added to perform \[additional validation\](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device + deprecated: false + description: | + Parameters for payment_intent + deprecated: false + encoding: + contract_term: + style: deepObject + explode: true + payment_intent: + style: deepObject + explode: true + statement_descriptor: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - subscription + type: object + properties: + subscription: + $ref: '#/components/schemas/Subscription' + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + invoice: + $ref: '#/components/schemas/Invoice' + unbilled_charges: + type: array + items: + $ref: '#/components/schemas/UnbilledCharge' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/charge_future_renewals: + post: + summary: Charge Future Renewals + description: | + Creates an advance invoice or an [advance invoicing schedule](advance_invoice_schedules#advance_invoice_schedule). When an advance invoice is generated, and [`auto_collection`](subscriptions#subscription_auto_collection) is `on` for the subscription, the [`payment_source`](subscriptions#subscription_payment_source_id) associated with the subscription is charged. Any changes scheduled for the subscription are taken into account automatically while generating an advance invoice. Advance invoices are not generated for a subscription when it is in the [`paused`](subscriptions#subscription_status) status. Advance invoices are generated only for non-`metered` items in a subscription. + operationId: charge_future_renewals + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?: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9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + terms_to_charge: + minimum: 1 + type: integer + description: | + * For `schedule_type = immediate`: the number of future billing cycles to be invoiced in advance. The invoicing is done for the [`remaining_billing_cycles`](subscriptions#subscription_remaining_billing_cycles) of the subscription if that is less than `terms_to_charge`. + * For `schedule_type = fixed_intervals`: The number of future billing cycles in one [interval](advance_invoice_schedules#fixed_interval_schedule). The schedule is created such that the total number of billing cycles in the schedule does not exceed the [remaining_billing_cycles](subscriptions#subscription_remaining_billing_cycles) of the subscription. + . + format: int32 + deprecated: false + default: 1 + invoice_immediately: + type: boolean + description: | + Whether the charge should be invoiced immediately or added to [`unbilled_charges`](unbilled_charges). Applicable only when [`schedule_type`](subscriptions#charge_future_renewals_schedule_type) is `immediate`. + deprecated: false + schedule_type: + type: string + description: | + The type of advance invoice or advance invoicing schedule. \* immediate - Charge immediately for the number of billing cycles specified by [`terms_to_charge`](subscriptions#charge_future_renewals_terms_to_charge). \* specific_dates - Charge on [specific dates](subscriptions#charge_future_renewals_specific_dates_schedule_date). For each date, specify the [number of billing cycles](subscriptions#charge_future_renewals_specific_dates_schedule_terms_to_charge) to charge for. Up to 5 dates can be configured. \* fixed_intervals - Charge at fixed intervals of time. Specify the [number of billing cycles](subscriptions#charge_future_renewals_terms_to_charge) that constitute an interval and the number of [days before each interval](subscriptions#charge_future_renewals_fixed_interval_schedule_days_before_renewal) that the invoice should be generated. Also specify [when the schedule should end](subscriptions#charge_future_renewals_fixed_interval_schedule_end_schedule_on). + deprecated: false + enum: + - immediate + - specific_dates + - fixed_intervals + fixed_interval_schedule: + type: object + properties: + number_of_occurrences: + minimum: 1 + type: integer + description: | + The number of advance invoices to generate. The schedule is created such that the total number of billing cycles in the schedule does not exceed the [`remaining_billing_cycles`](subscriptions#subscription_remaining_billing_cycles) of the subscription. This parameter is applicable only when [`fixed_interval_schedule[end_schedule_on]`](advance_invoice_schedules#advance_invoice_schedule_fixed_interval_schedule_end_schedule_on) = `after_number_of_intervals` + format: int32 + deprecated: false + days_before_renewal: + minimum: 1 + type: integer + description: | + The number of days before each interval that advance invoices are generated. + format: int32 + deprecated: false + end_schedule_on: + type: string + description: | + Specifies when the schedule should end. \* after_number_of_intervals - Advance invoices are generated a `specified number of times` \* subscription_end - Advance invoices are generated for as long as the subscription is active. \* specific_date - End the advance invoicing schedule on a `specific date`. + deprecated: false + enum: + - after_number_of_intervals + - specific_date + - subscription_end + end_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The date when the schedule should end. Advance invoices are not generated beyond this date. It must be at least 1 day before the start of the last billing cycle of the subscription and also within 5 years from the current date. This parameter is only applicable when [`fixed_interval_schedule[end_schedule_on]`](advance_invoice_schedules#advance_invoice_schedule_fixed_interval_schedule_end_schedule_on) = `specific_date`. + format: unix-time + deprecated: false + description: | + Parameters for fixed_interval_schedule + deprecated: false + specific_dates_schedule: + type: object + properties: + terms_to_charge: + type: array + description: | + The number of billing cycles to charge for, on the date specified. Applicable only when [`schedule_type`](advance_invoice_schedules#advance_invoice_schedule_schedule_type) is specific_dates. + items: + type: integer + format: int32 + deprecated: false + date: + type: array + description: | + The unique id of the member of the advance_invoice_schedule array which corresponds to the specific_dates_schedule that you intend to modify. Only applicable when [`schedule_type`](advance_invoice_schedules#advance_invoice_schedule_schedule_type) is `specific_dates`. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + description: | + Parameters for specific_dates_schedule + deprecated: false + encoding: + fixed_interval_schedule: + style: deepObject + explode: true + specific_dates_schedule: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - subscription + type: object + properties: + subscription: + $ref: '#/components/schemas/Subscription' + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + invoice: + $ref: '#/components/schemas/Invoice' + advance_invoice_schedules: + type: array + items: + $ref: '#/components/schemas/AdvanceInvoiceSchedule' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/add_charge_at_term_end: + post: + summary: Add charge at term end + description: | + Adds a one time charge to the subscription which will be added to the invoice generated at the end of the current term. If there are any applicable coupons in the subscription, an appropriate discount will be applied. + + To collect a charge immediately, [use this API](/docs/api/invoices#create_invoice_for_charge). + operationId: add_charge_at_term_end + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,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25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - description + type: object + properties: + amount: + minimum: 1 + type: integer + description: | + The amount to be charged. The unit depends on the [type of currency](/docs/api#md_disabled). + format: int64 + deprecated: false + description: + maxLength: 250 + type: string + description: | + Description for this charge. + deprecated: false + amount_in_decimal: + maxLength: 39 + type: string + description: | + The decimal representation of the amount for the [one-time charge](https://www.chargebee.com/docs/charges.html#one-time-charges ). Provide the value in major units of the currency. Can be provided only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled. + deprecated: false + avalara_sale_type: + type: string + description: | + Indicates the type of sale carried out. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. \* retail - Transaction is a sale to an end user \* wholesale - Transaction is a sale to another company that will resell your product or service to another consumer \* vendor_use - Transaction is for an item that is subject to vendor use tax \* consumed - Transaction is for an item that is consumed directly + deprecated: false + enum: + - wholesale + - retail + - consumed + - vendor_use + avalara_transaction_type: + type: integer + description: | + Indicates the type of product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. + format: int32 + deprecated: false + avalara_service_type: + type: integer + description: | + Indicates the type of service for the product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. + format: int32 + deprecated: false + date_from: + pattern: "^[0-9]{10}$" + type: integer + description: | + The time when the service period for the charge starts. + format: unix-time + deprecated: false + date_to: + pattern: "^[0-9]{10}$" + type: integer + description: | + The time when the service period for the charge ends. + format: unix-time + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - estimate + type: object + properties: + estimate: + $ref: '#/components/schemas/Estimate' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/remove_scheduled_changes: + post: + summary: Remove scheduled changes + description: | + **Caution** + + This API cannot be used for subscriptions that have [ramp](ramps?prod_cat_ver=2)s. + Removes the subscription changes scheduled on next renewal. Advance charges, if any, will be refunded as credits and a new invoice will be generated on renewal. + operationId: remove_scheduled_changes + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - subscription + type: object + properties: + subscription: + $ref: '#/components/schemas/Subscription' + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + credit_notes: + type: array + items: + $ref: '#/components/schemas/CreditNote' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/change_term_end: + post: + summary: Change term end + description: | + Changes the subscription's current term end date. Depending on the `status` of the subscription, 'term end date' has different effects. + + * If the subscription is in `trial`, it affects trial end date. + * If the subscription is `active`, it affects the next billing date. + * If the subscription is `non_renewing`, this affects the upcoming cancellation date. + + **Tip** + + This API can be used as a way to test subscription renewals and associated webhooks. + operationId: change_term_end + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?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A-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - term_ends_at + type: object + properties: + term_ends_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + The time at which the current term should end for this subscription. + format: unix-time + deprecated: false + prorate: + type: boolean + description: | + Applicable for *active* / *non_renewing* subscriptions. If specified as *true* prorated charges / credits will be added during this operation. + deprecated: false + invoice_immediately: + type: boolean + description: "If there are charges raised immediately for the subscription,\ + \ this parameter specifies whether those charges are to be invoiced\ + \ immediately or added to [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html).\ + \ The default value is as per the [site settings](https://www.chargebee.com/docs/unbilled-charges.html#configuration).\ + \ \n**Note:** `invoice_immediately` only affects charges that\ + \ are raised at the time of execution of this API call. Any charges\ + \ scheduled to be raised in the future are not affected by this\ + \ parameter. .\n" + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - subscription + type: object + properties: + subscription: + $ref: '#/components/schemas/Subscription' + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + invoice: + $ref: '#/components/schemas/Invoice' + unbilled_charges: + type: array + items: + $ref: '#/components/schemas/UnbilledCharge' + credit_notes: + type: array + items: + $ref: '#/components/schemas/CreditNote' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/delete: + post: + summary: Delete a subscription + description: | + Deletes the subscription resource. + operationId: delete_a_subscription + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\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])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - subscription + type: object + properties: + subscription: + $ref: '#/components/schemas/Subscription' + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/subscription_for_items: + post: + summary: Create subscription for Items + description: "**Note:** This endpoint optionally supports 3DS. To use it [create](./payment_intents?prod_cat_ver=2#create_a_payment_intent)\ + \ a `payment_intent` and provide it via this endpoint.\n\nCreates a new subscription\ + \ for an existing customer in Chargebee. Any available [credits and excess\ + \ payments](./customers?prod_cat_ver=2#customer_balances) for the customer\ + \ are automatically applied on the invoice. \n**See also**\n\n* [Create a\ + \ purchase](https://apidocs.chargebee.com/docs/api/purchases#create_a_purchase):\ + \ an operation that creates a purchase representing multiple subscriptions\ + \ bought together by a customer.\n" + operationId: create_subscription_for_items + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(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:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + id: + maxLength: 50 + type: string + description: | + A unique and immutable identifier for the subscription. If not provided, it is autogenerated. + deprecated: false + business_entity_id: + maxLength: 50 + type: string + description: "The unique ID of the [business entity](/docs/api/advanced-features?prod_cat_ver=2#mbe)\ + \ this subscription should be [linked](/docs/api/advanced-features?prod_cat_ver=2#mbe-linked-be)\ + \ to. Applicable only when multiple business entities have been\ + \ created for the site. This must be the same as the business\ + \ entity of the `{customer_id}` for the operation to be successful.\ + \ \n**Note**\n\nAn alternative way of passing this parameter\ + \ is by means of a [custom HTTP header](/docs/api/advanced-features?prod_cat_ver=2#mbe-header-main).\n\ + .\n" + deprecated: false + trial_end: + pattern: "^[0-9]{10}$" + type: integer + description: | + End of the trial period for the subscription. This overrides the trial period set for the plan-item. The value must be later than `start_date`. Set it to `0` to have no trial period. + format: unix-time + deprecated: false + billing_cycles: + minimum: 0 + type: integer + description: | + Specifies the number of billing cycles for the subscription. The behavior of the subscription after the billing cycles have completed depends on whether the subscription is on a [contract term](contract_terms?prod_cat_ver=2) or not. + + * When the subscription is not on a contract term: if `billing_cycles` is not provided, then the billing cycles [set for the plan-item price](item_prices?prod_cat_ver=2#item_price_billing_cycles) is used. Moreover, once the `billing_cycles` have completed, the subscription cancels. + * When the subscription is on a contract term: Providing `billing_cycles` is mandatory. Moreover, once the `billing_cycles` have completed, the behavior of the subscription is determined by the `contract_term[action_at_term_end]` parameter. + format: int32 + deprecated: false + mandatory_items_to_remove: + type: array + description: | + Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver=2) that are to be removed from the subscription. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + net_term_days: + type: integer + description: | + Defines [Net D](https://www.chargebee.com/docs/net_d.html) for the subscription. Net D is the number of days within which any invoice raised for the subscription must be paid. + + * If a value is provided: Net D is set explicitly for the subscription to the value provided. The value must be one among those defined in the [site configuration](https://www.chargebee.com/docs/net_d.html#enable-net-d-for-chargebee-invoices). + * If not provided: The attribute is not set and therefore not returned by the API. In this case, when an invoice is raised -- whether now or later -- the `net_term_days` defined at the [customer level](customers#customer_net_term_days) is considered. + . + format: int32 + deprecated: false + start_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The date/time at which the subscription is to start. If not provided, the subscription starts immediately. You can provide a value in the past as well. This is called backdating the subscription creation and is done when the subscription has already been provisioned but its billing has been delayed. Backdating is allowed only when the following prerequisites are met: + + * Backdating is enabled for subscription creation operations. + * The current day of the month does not exceed the limit set in Chargebee for backdating such operations. This day is typically the day of the month by which the accounting for the previous month must be closed. + * The date is not more than duration X into the past, where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `start_date` cannot be earlier than 14th February. + . + format: unix-time + deprecated: false + auto_collection: + type: string + description: | + Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property. \* on - Whenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available. \* off - Automatic collection of charges will not be made for this subscription. Use this for offline payments. + deprecated: false + enum: + - "on" + - "off" + terms_to_charge: + minimum: 1 + type: integer + description: | + The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html). + format: int32 + deprecated: false + billing_alignment_mode: + type: string + description: | + Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date) for Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site. \* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly.. \* delayed - Subscription period will be aligned with the configured billing date at the next renewal. + deprecated: false + enum: + - immediate + - delayed + po_number: + maxLength: 100 + type: string + description: | + Purchase order number for this subscription. + deprecated: false + coupon_ids: + type: array + description: | + List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + payment_source_id: + maxLength: 40 + type: string + description: | + Id of the payment source to be attached to this subscription. + deprecated: false + override_relationship: + type: boolean + description: | + If `true`, ignores the [hierarchy relationship](./customers?prod_cat_ver=2#customer_relationship) and uses customer as payment and invoice owner. + deprecated: false + invoice_notes: + maxLength: 2000 + type: string + description: | + A customer-facing note added to all invoices associated with this subscription. This note is one among [all the notes](/docs/api/invoices#invoice_notes) displayed on the invoice PDF. + deprecated: false + invoice_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The document date displayed on the invoice PDF. The default value is the current date. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. Moreover, if `create_pending_invoices` is set to `true`, and if the site is configured to set invoice dates to the date of closing, then upon invoice closure, this date is changed to the invoice closing date. `taxes` and `line_item_taxes` are computed based on the tax configuration as of `invoice_date`. When passing this parameter, the following prerequisites must be met: + + * `invoice_date` must be in the past. + * It is not earlier than `start_date`. + * It is not more than one calendar month into the past. Eg. If today is 13th January, then you cannot pass a value that is earlier than 13th December. + * `invoice_immediately` is true. + . + format: unix-time + deprecated: false + meta_data: + type: object + additionalProperties: true + description: | + A collection of key-value pairs that provides extra information about the subscription. \*\*Note:\*\* There's a character limit of 65,535. \[Learn more\](advanced-features?prod_cat_ver=2#metadata). + deprecated: false + invoice_immediately: + type: boolean + description: "If there are charges raised immediately for the subscription,\ + \ this parameter specifies whether those charges are to be invoiced\ + \ immediately or added to [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html).\ + \ The default value is as per the [site settings](https://www.chargebee.com/docs/unbilled-charges.html#configuration).\ + \ \n**Note:** `invoice_immediately` only affects charges that\ + \ are raised at the time of execution of this API call. Any charges\ + \ scheduled to be raised in the future are not affected by this\ + \ parameter. .\n" + deprecated: false + replace_primary_payment_source: + type: boolean + description: | + Indicates whether the primary payment source should be replaced with this payment source. In case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False. + deprecated: false + default: true + free_period: + minimum: 1 + type: integer + description: | + The period of time by which the first term of the subscription is to be extended free-of-charge. The value must be in multiples of free_period_unit. + format: int32 + deprecated: false + free_period_unit: + type: string + description: | + The unit of time in multiples of which the free_period parameter is expressed. The value must be equal to or lower than the [period_unit](/docs/api/plans#create_a_plan_period_unit) attribute of the [plan](/docs/api/subscriptions#create_a_subscription_plan_id) chosen. \* week - Charge based on week(s) \* month - Charge based on month(s) \* day - Charge based on day(s) \* year - Charge based on year(s) + deprecated: false + enum: + - day + - week + - month + - year + contract_term_billing_cycle_on_renewal: + maximum: 100 + minimum: 1 + type: integer + description: | + Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles` or a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms). + format: int32 + deprecated: false + create_pending_invoices: + type: boolean + description: | + Indicates whether the invoices for this subscription are generated with a `pending` `status`. This attribute is set to `true` automatically when the subscription has item prices that belong to `metered` items. + + You can also set this to `true` explicitly using the [create](/docs/api/subscriptions#create_subscription_for_items_create_pending_invoices)/[update](/docs/api/subscriptions#update_subscription_for_items_create_pending_invoices) subscription operations. This is useful in the following scenarios: + + * When tracking usages and calculating usage-based charges on your end. You can then add them to the subscription as a [one-time charge](https://www.chargebee.com/docs/charges.html) at the end of the billing term. + * When you need to inspect all charges before closing invoices for this subscription. + + Applicable only when [Metered Billing](https://www.chargebee.com/docs/metered_billing.html) is enabled for the site + . + deprecated: false + auto_close_invoices: + type: boolean + description: | + Set to `false` to override for this subscription, the [site-level setting](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing) for auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute has a higher precedence than the same attribute at the [customer level](/docs/api/customers?prod_cat_ver=2#customer_auto_close_invoices). + deprecated: false + first_invoice_pending: + type: boolean + description: | + If you want to bill the usages from the previous billing cycle, set this parameter to `true`. This is useful if the subscription has moved from another system into Chargebee and you haven't closed the previous cycle's invoice yet. This creates a `pending` invoice immediately on subscription creation, to which you can [add usages](/docs/api/usages#create_a_usage) for the previous cycle. + + If any non-`metered` items are present for the current term, they're also added to this `pending` invoice. As with all `pending` invoices, this invoice is also [closed automatically](https://www.chargebee.com/docs/metered_billing.html#configuring-metered-billing) or via an [API call](/docs/api/invoices#close_a_pending_invoice). This parameter can be passed only when the `create_pending_invoices` is `true` + . + deprecated: false + default: false + trial_end_action: + type: string + description: | + Applicable only when [End-of-trial Action](https://www.chargebee.com/docs/2.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions) has been enabled for the site. Whenever the subscription has a trial period, this attribute (parameter) is returned (required) and specifies the operation to be carried out for the subscription once the trial ends. \* cancel_subscription - The subscription cancels. \* activate_subscription - The subscription activates and charges are raised for non-metered items. \* plan_default - The action [configured for the site](https://www.chargebee.com/docs/trial_periods.html#how-to-define-the-end-of-trial-actions-for-subscriptions) at the time when the trial ends, takes effect. This is the default value when `trial_end_action` is defined for the plan. \* site_default - The action [configured for the site](https://www.chargebee.com/docs/trial_periods.html#how-to-define-the-end-of-trial-actions-for-subscriptions) at the time when the trial ends, takes effect. This is the default value when `trial_end_action` is **not** defined for the plan. + deprecated: false + enum: + - site_default + - plan_default + - activate_subscription + - cancel_subscription + payment_initiator: + type: string + description: | + The type of initiator to be used for the payment request triggered by this operation. \* customer - Pass this value to indicate that the request is initiated by the customer \* merchant - Pass this value to indicate that the request is initiated by the merchant + deprecated: false + enum: + - customer + - merchant + shipping_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for shipping_address + deprecated: false + statement_descriptor: + type: object + properties: + descriptor: + maxLength: 65000 + type: string + deprecated: false + deprecated: false + payment_intent: + type: object + properties: + id: + maxLength: 150 + type: string + description: | + Identifier for PaymentIntent generated by Chargebee.js. Applicable only when you are using Chargebee.js for completing the 3DS flow. The PaymentIntent should be in 'authorized' state while passing it here. You need not pass other PaymentIntent parameters if this is passed. + deprecated: false + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account used for performing the 3DS flow. + deprecated: false + gw_token: + maxLength: 65000 + type: string + description: | + Identifier for 3DS transaction/verification object at the gateway. Can be passed only after successfully completing the 3DS flow. Refer [3DS implementation in Chargebee](/docs/api/3ds_card_payments#3ds-gateway-side-implementation) to find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow. + deprecated: false + payment_method_type: + type: string + description: | + The list of payment method types (For example, card, ideal, sofort, bancontact, etc.) this Payment Intent is allowed to use. If payment method type is empty, Card is taken as the default type for all gateways except Razorpay. \* card - card \* dotpay - dotpay \* faster_payments - Faster Payments \* upi - upi \* google_pay - google_pay \* paypal_express_checkout - paypal_express_checkout \* venmo - Venmo \* klarna_pay_now - Klarna Pay Now \* ideal - ideal \* pay_to - PayTo \* boleto - boleto \* netbanking_emandates - netbanking_emandates \* direct_debit - direct_debit \* sepa_instant_transfer - Sepa Instant Transfer \* bancontact - bancontact \* apple_pay - apple_pay \* giropay - giropay \* sofort - sofort \* amazon_payments - Amazon Payments + deprecated: false + enum: + - card + - ideal + - sofort + - bancontact + - google_pay + - dotpay + - giropay + - apple_pay + - upi + - netbanking_emandates + - paypal_express_checkout + - direct_debit + - boleto + - venmo + - amazon_payments + - pay_to + - faster_payments + - sepa_instant_transfer + - klarna_pay_now + reference_id: + maxLength: 65000 + type: string + description: | + Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow. + deprecated: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`checkout_com\`: While adding a new payment method using \[permanent token\](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, \`document\` ID and \`country_of_residence\` are required to support payments through \[dLocal\](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). \* \`payer\`: User related information. \* \`country_of_residence\`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a \[two-character ISO code\](https://docs.checkout.com/resources/codes/country-codes). \* \`document\`: Document ID is the user's \[identification number\](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. \* \`bluesnap\`: While passing raw card details to BlueSnap, if \`fraud_session_id\` is added, \[additional validation\](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your \[BlueSnap fraud session ID\](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. \* \`braintree\`: While passing raw card details to Braintree, your \`fraud_merchant_id\` and the user's \`device_session_id\` can be added to perform \[additional validation\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`fraud_merchant_id\`: Your \[merchant ID\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. \* \`chargebee_payments\`: While passing raw card details to Chargebee Payments, if \`fraud_session_id\` is added, additional validation is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. \* \`bank_of_america\`: While passing raw card details to Bank of America, your user's \`device_session_id\` can be added to perform additional validation and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`ecentric\`: This parameter is used to verify and process payment method details in Ecentric. If the \`merchant_id\` parameter is included, Chargebee will vault it / perform a lookup and verification against this \`merchant_id\`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. \* \`merchant_id\`: Merchant GUID where the card is vaulted or need to be vaulted. \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries and \`device_session_id\` can be added to perform \[additional validation\](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device + deprecated: false + description: | + Parameters for payment_intent + deprecated: false + contract_term: + type: object + properties: + action_at_term_end: + type: string + description: |+ + Action to be taken when the contract term completes. \* evergreen - Contract term completes and the subscription renews. \* renew - + * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](subscriptions#create_subscription_for_customer_contract_term_billing_cycle_on_renewal). + * The `action_at_term_end` for the new contract term is set to `renew`. + \* cancel - Contract term completes and subscription is canceled. + + deprecated: false + enum: + - renew + - evergreen + - cancel + cancellation_cutoff_period: + type: integer + description: | + The number of days before [`contract_end`](contract_terms#contract_term_contract_end), during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure + format: int32 + deprecated: false + default: 0 + description: | + Parameters for contract_term + deprecated: false + subscription_items: + required: + - item_price_id + type: object + properties: + item_price_id: + type: array + description: | + The unique identifier of the item price. + items: + maxLength: 100 + type: string + deprecated: false + quantity: + type: array + description: | + The quantity of the item purchased + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + unit_price: + type: array + description: | + Sub Item Plan Unit Amount for create subscription + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + unit_price_in_decimal: + type: array + description: | + Sub Item Plan Unit Amount in Decimal for create subscription + items: + maxLength: 39 + type: string + deprecated: false + billing_cycles: + type: array + description: "For the plan-item price: \nthe value determines\ + \ the number of billing cycles the subscription runs before\ + \ canceling automatically. If not provided, then [the value\ + \ set](./item_prices?prod_cat_ver=2#item_price_attributes)\ + \ for the plan-item price is used. \n\nFor addon-item prices:\ + \ \nIf [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html)\ + \ are enabled then this is the number of subscription billing\ + \ cycles for which the addon is included. If not provided,\ + \ then [the value set under attached addons](./attached_items?prod_cat_ver=2#attached_item_attributes)\ + \ is used. Further, if that value is not provided, then [the\ + \ value set for the addon-item price](./item_prices?prod_cat_ver=2#item_price_attributes)\ + \ is used.\n" + items: + minimum: 0 + type: integer + format: int32 + deprecated: false + trial_end: + type: array + description: | + The date/time when the trial period of the item ends. Applies to plan-items and----when [enabled](https://www.chargebee.com/docs/2.0/addons-trial.html)----addon-items as well. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + service_period_days: + type: array + description: | + The service period of the item in days from the day of charge. + items: + maximum: 730 + minimum: 1 + type: integer + format: int32 + deprecated: false + charge_on_event: + type: array + items: + type: string + description: | + When `charge_on_option` option is set to `on_event`, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items. \* contract_termination - when a contract term is [terminated](./subscriptions?prod_cat_ver=2#cancel_subscription_for_items_contract_term_cancel_option). \* subscription_trial_start - the time when the trial period of the subscription begins. \* plan_activation - same as subscription activation, but also includes the case when the plan-item of the subscription is changed. \* subscription_activation - the moment a subscription enters an `active` or `non-renewing` state. Also includes reactivations of canceled subscriptions. \* subscription_creation - the time of creation of the subscription. + deprecated: false + enum: + - subscription_creation + - subscription_trial_start + - plan_activation + - subscription_activation + - contract_termination + charge_once: + type: array + description: | + Indicates if the charge-item is to be charged only once or each time the `charge_on_event` occurs. This parameter only applies to charge-items. + items: + type: boolean + deprecated: false + charge_on_option: + type: array + items: + type: string + description: | + Indicates when the charge-item is to be charged. This parameter only applies to charge-items. \* on_event - The item is charged at the occurrence of the event specified as `charge_on_event`. \* immediately - The item is charged immediately on being added to the subscription. + deprecated: false + enum: + - immediately + - on_event + description: | + Parameters for subscription_items + deprecated: false + discounts: + required: + - apply_on + - duration_type + type: object + properties: + apply_on: + type: array + items: + type: string + description: | + The amount on the invoice to which the discount is applied. \* invoice_amount - The discount is applied to the invoice `sub_total`. \* specific_item_price - The discount is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id`. + deprecated: false + enum: + - invoice_amount + - specific_item_price + duration_type: + type: array + items: + type: string + description: | + Specifies the time duration for which this discount is attached to the subscription. \* forever - The discount is attached to the subscription and applied on the invoices till it is [explicitly removed](/docs/api/subscriptions?prod_cat_ver=2#update_subscription_for_items_discounts_operation_type). \* limited_period - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period` and `period_unit`. \* one_time - The discount stays attached to the subscription till it is applied on an invoice **once**. It is removed after that from the subscription. + deprecated: false + default: forever + enum: + - one_time + - forever + - limited_period + percentage: + type: array + description: | + The percentage of the original amount that should be deducted from it. Only applicable when `discount.type` is percentage. + items: + maximum: 100 + minimum: 0.01 + type: number + format: double + deprecated: false + amount: + type: array + description: | + The value of the discount. [The format of this value](https://apidocs.chargebee.com/docs/api?prod_cat_ver=2#currencies) depends on the kind of currency. This is only applicable when `discount.type` is `fixed_amount`. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + period: + type: array + description: | + The duration of time for which the discount is attached to the subscription, in `period_units`. Applicable only when `duration_type` is `limited_period`. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + period_unit: + type: array + items: + type: string + description: | + The unit of time for `period`. Applicable only when `duration_type` is `limited_period`. \* day - A period of 24 hours. \* week - A period of 7 days. \* month - A period of 1 calendar month. \* year - A period of 1 calendar year. + deprecated: false + enum: + - day + - week + - month + - year + included_in_mrr: + type: array + description: | + The discount is included in MRR calculations for your site. This attribute is only applicable when `duration_type` is `one_time` and when the [feature is enabled](https://www.chargebee.com/docs/reporting.html#dashboards_flexible-mrr-calculation) in Chargebee. Also, If the [site-level setting](https://www.chargebee.com/docs/reporting.html#chart_flexible-mrr-calculation) is to exclude one-time discounts from MRR calculations, this value is always returned `false`. + items: + type: boolean + deprecated: false + item_price_id: + type: array + description: | + The [id of the item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) in the subscription to which the discount is to be applied. Relevant only when `apply_on` = `specific_item_price`. + items: + maxLength: 100 + type: string + deprecated: false + description: | + Parameters for discounts + deprecated: false + item_tiers: + type: object + properties: + item_price_id: + type: array + description: | + The id of the item price for which the tier price is being overridden. + items: + maxLength: 100 + type: string + deprecated: false + starting_unit: + type: array + description: | + The lowest value in the quantity tier. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + ending_unit: + type: array + description: | + The highest value in the quantity tier. + items: + type: integer + format: int32 + deprecated: false + price: + type: array + description: | + The overridden price of the tier. The value depends on the [type of currency](./#handling_currency_units). + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + default: 0 + starting_unit_in_decimal: + type: array + description: | + The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal` of the next lower tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + ending_unit_in_decimal: + type: array + description: | + The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal` of the next higher tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + price_in_decimal: + type: array + description: | + The decimal representation of the per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. When the `pricing_model` is `stairstep`, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: | + Parameters for item_tiers + deprecated: false + additionalProperties: true + encoding: + contract_term: + style: deepObject + explode: true + discounts: + style: deepObject + explode: true + item_tiers: + style: deepObject + explode: true + payment_intent: + style: deepObject + explode: true + shipping_address: + style: deepObject + explode: true + statement_descriptor: + style: deepObject + explode: true + subscription_items: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - subscription + type: object + properties: + subscription: + $ref: '#/components/schemas/Subscription' + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + invoice: + $ref: '#/components/schemas/Invoice' + unbilled_charges: + type: array + items: + $ref: '#/components/schemas/UnbilledCharge' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/import_unbilled_charges: + post: + summary: Import unbilled charges + description: | + Imports unbilled charges into Chargebee. + operationId: import_unbilled_charges + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?: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0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + unbilled_charges: + required: + - date_from + - date_to + - entity_type + type: object + properties: + id: + type: array + description: | + Uniquely identifies an unbilled charge. + items: + maxLength: 40 + type: string + deprecated: false + date_from: + type: array + description: | + Start date of this charge. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + date_to: + type: array + description: | + End date of this charge. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + entity_type: + type: array + items: + type: string + description: | + Specifies the modelled entity this line item is based on. \* plan - Indicates that this lineitem is based on 'Plan' entity. The 'entity_id' attribute specifies the [plan](/docs/api/plans#plan_attributes) id \* charge_item_price - Indicates that this line item is based on charge Item Price \* addon_item_price - Indicates that this line item is based on addon Item Price \* plan_setup - Indicates that this lineitem is based on 'Plan Setup' charge. The 'entity_id' attribute specifies the [plan](/docs/api/plans#plan_attributes) id \* adhoc - Indicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case \* addon - Indicates that this lineitem is based on 'Addon' entity. The 'entity_id' attribute specifies the [addon](/docs/api/addons#addon_attributes) id \* plan_item_price - Indicates that this line item is based on plan Item Price + deprecated: false + enum: + - adhoc + - plan_item_price + - addon_item_price + - charge_item_price + entity_id: + type: array + description: | + The identifier of the modelled entity this charge is based on. Will be null for 'adhoc' entity type. + items: + maxLength: 100 + type: string + deprecated: false + description: + type: array + description: | + Detailed description about this charge. + items: + maxLength: 250 + type: string + deprecated: false + unit_amount: + type: array + description: | + Unit amount of the charge item. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + quantity: + type: array + description: | + Quantity of the item which is represented by this charge. + items: + minimum: 0 + type: integer + format: int32 + deprecated: false + amount: + type: array + description: | + Total amount of this charge. Typically equals to unit amount x quantity. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + unit_amount_in_decimal: + type: array + description: | + The decimal representation of the amount for the charge, in major units of the currency. Typically equals to `unit_amount_in_decimal` x `quantity_in_decimal`. Returned when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of this entity. Returned when the entity is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + amount_in_decimal: + type: array + description: | + The decimal representation of the unit amount for the entity. The value is in major units of the currency. Returned when the entity is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + discount_amount: + type: array + description: | + Total discounts for this charge. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + use_for_proration: + type: array + description: | + If the unbilled charge falls within the subscription's current term it will be used for proration. + items: + type: boolean + deprecated: false + default: false + is_advance_charge: + type: array + description: | + The value of this parameter will be true if it is a recurring unbilled charge for a future term. + items: + type: boolean + deprecated: false + default: false + description: | + Parameters for unbilled_charges + deprecated: false + discounts: + required: + - amount + type: object + properties: + unbilled_charge_id: + type: array + description: | + Uniquely identifies an unbilled charge. + items: + maxLength: 40 + type: string + deprecated: false + entity_type: + type: array + items: + type: string + description: | + The type of deduction and the amount to which it is applied. \* document_level_coupon - The deduction is due to a coupon applied to the invoice `sub_total`. The coupon id is passed as `entity_id`. \* prorated_credits - The deduction is due to a legacy adjustment credit applied to the invoice. The `entity_id` is `null` in this case. The legacy credits feature is superseded by [adjustment_credit_notes](/docs/api/invoices?prod_cat_ver=2#invoice_adjustment_credit_notes). \* item_level_coupon - The deduction is due to a coupon applied to line item. The coupon `id` is passed as `entity_id`. \* document_level_discount - The deduction is due to a [discount](/docs/api/discounts?prod_cat_ver=2) applied to the invoice `sub_total`. The discount `id` is available as the `entity_id`. \* item_level_discount - The deduction is due to a [discount](/docs/api/discounts?prod_cat_ver=2) applied to a line item of the invoice. The discount `id` is available as the `entity_id`. \* promotional_credits - The deduction is due to a [promotional credit](/docs/api/promotional_credits?prod_cat_ver=2) applied to the invoice. + deprecated: false + enum: + - item_level_coupon + - document_level_coupon + - item_level_discount + - document_level_discount + entity_id: + type: array + description: | + When the deduction is due to a `coupon`, then this is the `id` of the coupon. Is required when `discounts[entity_type]` is `item_level_coupon` or `document_level_coupon`. + items: + maxLength: 100 + type: string + deprecated: false + description: + type: array + description: | + Description for this deduction. + items: + maxLength: 250 + type: string + deprecated: false + amount: + type: array + description: | + The amount deducted. The format of this value depends on the [kind of currency](/docs/api?prod_cat_ver=2#currencies). + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + description: | + Parameters for discounts + deprecated: false + tiers: + required: + - unbilled_charge_id + type: object + properties: + unbilled_charge_id: + type: array + description: | + Uniquely identifies an unbilled charge. + items: + maxLength: 40 + type: string + deprecated: false + starting_unit: + type: array + description: | + The lower limit of a range of units for the tier + items: + minimum: 0 + type: integer + format: int32 + deprecated: false + ending_unit: + type: array + description: | + The upper limit of a range of units for the tier + items: + type: integer + format: int32 + deprecated: false + quantity_used: + type: array + description: | + The number of units purchased in a range. + items: + minimum: 0 + type: integer + format: int32 + deprecated: false + unit_amount: + type: array + description: | + The price of the tier if the charge model is a `stairtstep` pricing , or the price of each unit in the tier if the charge model is `tiered`/`volume` pricing. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + starting_unit_in_decimal: + type: array + description: | + The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal` of the next lower tier. Returned only when the `line_items.pricing_model` is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + ending_unit_in_decimal: + type: array + description: | + The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal` of the next higher tier. Returned only when the `line_items.pricing_model` is `tiered`, `volume` or stairstep and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + quantity_used_in_decimal: + type: array + description: | + The decimal representation of the quantity purchased from this tier. Returned when the `line_item` is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + unit_amount_in_decimal: + type: array + description: | + The decimal representation of the per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. When the `pricing_model` is `stairstep`, it is the decimal representation of the total price for `line_item`. The value is in major units of the currency. Returned when the `line_item` is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled. + items: + maxLength: 40 + type: string + deprecated: false + description: | + Parameters for tiers + deprecated: false + encoding: + discounts: + style: deepObject + explode: true + tiers: + style: deepObject + explode: true + unbilled_charges: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - unbilled_charges + type: object + properties: + unbilled_charges: + type: array + items: + $ref: '#/components/schemas/UnbilledCharge' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/remove_scheduled_resumption: + post: + summary: Remove scheduled resumption + description: | + If the subscription is in **Paused** state and is scheduled to resume on a specific_date, this API can be used to remove the scheduled resumption. When the scheduled resumption is removed, the subscription will remain **Paused**. + operationId: remove_scheduled_resumption + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA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]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - subscription + type: object + properties: + subscription: + $ref: '#/components/schemas/Subscription' + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}: + get: + summary: Retrieve a subscription + description: | + Retrieves a subscription. + operationId: retrieve_a_subscription + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?: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]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - subscription + type: object + properties: + subscription: + $ref: '#/components/schemas/Subscription' + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/import_contract_term: + post: + summary: Import contract term + description: "Import previous and active [contract terms](./contract_terms).\ + \ \n\nFor contract terms in `active` state, import is allowed only if the\ + \ associated subscription is `active`, `in_trial`, `future` or `non-renewing`.\ + \ \n" + operationId: import_contract_term + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern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\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + contract_term_billing_cycle_on_renewal: + maximum: 100 + minimum: 1 + type: integer + description: | + Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles` or a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms). + format: int32 + deprecated: false + contract_term: + type: object + properties: + id: + maxLength: 50 + type: string + description: | + Id that uniquely identifies the contract term in the site. + deprecated: false + created_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + The date when the contract term was created. + format: unix-time + deprecated: false + contract_start: + pattern: "^[0-9]{10}$" + type: integer + description: | + The start date of the contract term + format: unix-time + deprecated: false + contract_end: + pattern: "^[0-9]{10}$" + type: integer + description: | + The end date of the contract term + format: unix-time + deprecated: false + status: + type: string + description: | + Current status of contract \* active - An actively running contract term. \* completed - The contract term has run its full duration. \* cancelled - The contract term was ended because: + + * a change in the subscription caused a [subscription term reset](subscriptions#update_a_subscription_force_term_reset). + * the subscription was cancelled due to non-payment. + \* terminated - The contract term was terminated ahead of completion. + deprecated: false + enum: + - active + - completed + - cancelled + - terminated + total_amount_raised: + minimum: 0 + type: integer + description: | + The amount raised for the contract term till the time of importing the subscription. This amount is added to the [total_contract_value](contract_terms#contract_term_total_contract_value) + format: int64 + deprecated: false + default: 0 + total_amount_raised_before_tax: + minimum: 0 + type: integer + description: | + The amount raised for the contract term till the time of importing the subscription excluding tax. This amount is added to the [total_contract_value_before_tax](contract_terms#contract_term_total_contract_value) + format: int64 + deprecated: false + default: 0 + total_contract_value: + minimum: 0 + type: integer + description: | + The sum of the [totals](invoices#invoice_total) of all the invoices raised as part of the contract term. For `active` contract terms, this is a predicted value. The value depends on the [type of currency](./#handling_currency_units). If the subscription was [imported](#import_a_subscription) with the contract term, then this value includes the value passed for `total_amount_raised`. + format: int64 + deprecated: false + default: 0 + total_contract_value_before_tax: + minimum: 0 + type: integer + description: | + It refers to the total amount of revenue that is expected to be generated from a specific contract term, calculated as the sum of all invoices raised during the term, regardless of payment status. It is based on past performance and the specified currency in the contract. If the subscription was imported, the value for `total_amount_raised_before_tax` is included in the calculation of the total contract value before tax. It's important to note that this value excludes any applicable taxes. + format: int64 + deprecated: false + default: 0 + billing_cycle: + minimum: 0 + type: integer + description: | + The number of billing cycles of the subscription that the contract term is for. + format: int32 + deprecated: false + action_at_term_end: + type: string + description: |+ + Action to be taken when the contract term completes. \* evergreen - Contract term completes and the subscription renews. \* renew_once - Used when you want to renew the contract term just once. Does the following: + * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](subscriptions#create_subscription_for_customer_contract_term_billing_cycle_on_renewal). + * The `action_at_term_end` for the new contract term is set to `cancel`. + \* cancel - Contract term completes and subscription is canceled. \* renew - + * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](subscriptions#create_subscription_for_customer_contract_term_billing_cycle_on_renewal). + * The `action_at_term_end` for the new contract term is set to `renew`. + + deprecated: false + default: renew + enum: + - renew + - evergreen + - cancel + - renew_once + cancellation_cutoff_period: + type: integer + description: | + The number of days before [`contract_end`](contract_terms#contract_term_contract_end), during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure + format: int32 + deprecated: false + description: | + Parameters for contract_term + deprecated: false + encoding: + contract_term: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - contract_term + type: object + properties: + contract_term: + $ref: '#/components/schemas/ContractTerm' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/override_billing_profile: + post: + summary: Override Billing Profile + description: | + Assigns the payment source and sets auto collection state for the subscription. + operationId: override_billing_profile + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + payment_source_id: + maxLength: 40 + type: string + description: | + Unique identifier of the payment source to be attached to this subscription. + deprecated: false + auto_collection: + type: string + description: | + Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property. \* off - Automatic collection of charges will not be made for this subscription. Use this for offline payments. \* on - Whenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available. + deprecated: false + enum: + - "on" + - "off" + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - subscription + type: object + properties: + subscription: + $ref: '#/components/schemas/Subscription' + payment_source: + $ref: '#/components/schemas/PaymentSource' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/remove_scheduled_pause: + post: + summary: Remove scheduled pause + description: | + If the subscription is in **Active** or **Non Renewing** state and is also scheduled to pause at the end_of_term/specific_date, this API can be used to remove the scheduled pause. + operationId: remove_scheduled_pause + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0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1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - subscription + type: object + properties: + subscription: + $ref: '#/components/schemas/Subscription' + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/edit_advance_invoice_schedule: + post: + summary: Edit Advance Invoice Schedule + description: | + **Caution** + + This API cannot be used for subscriptions that have [ramp](ramps?prod_cat_ver=2)s. + + Modifies the [advance invoicing schedule](advance_invoice_schedules#advance_invoice_schedule) for a subscription. + operationId: edit_advance_invoice_schedule + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]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-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + terms_to_charge: + minimum: 1 + type: integer + description: | + The number of billing cycles in one interval. + format: int32 + deprecated: false + schedule_type: + type: string + description: | + The type of advance invoice or advance invoicing schedule. \* specific_dates - Charge on [specific dates](subscriptions#charge_future_renewals_specific_dates_schedule_date). For each date, specify the [number of billing cycles](subscriptions#charge_future_renewals_specific_dates_schedule_terms_to_charge) to charge for. Up to 5 dates can be configured. \* fixed_intervals - Charge at fixed intervals of time. Specify the [number of billing cycles](subscriptions#charge_future_renewals_terms_to_charge) that constitute an interval and the number of [days before each interval](subscriptions#charge_future_renewals_fixed_interval_schedule_days_before_renewal) that the invoice should be generated. Also specify [when the schedule should end](subscriptions#charge_future_renewals_fixed_interval_schedule_end_schedule_on). + deprecated: false + enum: + - specific_dates + - fixed_intervals + fixed_interval_schedule: + type: object + properties: + number_of_occurrences: + minimum: 1 + type: integer + description: | + The number of advance invoices to generate. The schedule is created such that the total number of billing cycles in the schedule does not exceed the [`remaining_billing_cycles`](subscriptions#subscription_remaining_billing_cycles) of the subscription. This parameter is applicable only when [`fixed_interval_schedule[end_schedule_on]`](advance_invoice_schedules#advance_invoice_schedule_fixed_interval_schedule_end_schedule_on) = `after_number_of_intervals` + format: int32 + deprecated: false + days_before_renewal: + minimum: 1 + type: integer + description: | + The number of days before each interval that advance invoices are generated. + format: int32 + deprecated: false + end_schedule_on: + type: string + description: | + Specifies when the schedule should end. \* after_number_of_intervals - Advance invoices are generated a `specified number of times` \* subscription_end - Advance invoices are generated for as long as the subscription is active. \* specific_date - End the advance invoicing schedule on a `specific date`. + deprecated: false + enum: + - after_number_of_intervals + - specific_date + - subscription_end + end_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The date when the schedule should end. Advance invoices are not generated beyond this date. It must be at least 1 day before the start of the last billing cycle of the subscription and also within 5 years from the current date. This parameter is only applicable when [`fixed_interval_schedule[end_schedule_on]`](advance_invoice_schedules#advance_invoice_schedule_fixed_interval_schedule_end_schedule_on) = `specific_date`. + format: unix-time + deprecated: false + description: | + Parameters for fixed_interval_schedule + deprecated: false + specific_dates_schedule: + type: object + properties: + id: + type: array + description: | + The [unique id](advance_invoice_schedules#advance_invoice_schedule_id) of the member of the [advance_invoice_schedule](advance_invoice_schedules#advance_invoice_schedule) array which corresponds to the [specific_dates_schedule](advance_invoice_schedules#advance_invoice_schedule_specific_dates_schedule) that you intend to modify. Only applicable when [schedule_type](subscriptions#edit_advance_invoice_schedule_schedule_type) is specific_dates. + items: + maxLength: 50 + type: string + deprecated: false + terms_to_charge: + type: array + description: | + The number of billing cycles to charge for, on the date specified. Applicable only when [`schedule_type`](advance_invoice_schedules#advance_invoice_schedule_schedule_type) is specific_dates. + items: + type: integer + format: int32 + deprecated: false + date: + type: array + description: | + The unique id of the member of the advance_invoice_schedule array which corresponds to the specific_dates_schedule that you intend to modify. Only applicable when [`schedule_type`](advance_invoice_schedules#advance_invoice_schedule_schedule_type) is `specific_dates`. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + description: | + Parameters for specific_dates_schedule + deprecated: false + encoding: + fixed_interval_schedule: + style: deepObject + explode: true + specific_dates_schedule: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - advance_invoice_schedules + type: object + properties: + advance_invoice_schedules: + type: array + items: + $ref: '#/components/schemas/AdvanceInvoiceSchedule' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/discounts: + get: + summary: List discounts for a subscription + description: "Retrieves a list of [discount](discounts) resources [currently\ + \ attached](subscriptions#subscription_discounts) to a specific subscription.\ + \ The list is sorted in descending order based on the [created_at](discounts#discount_created_at)\ + \ timestamp. \n**Note**\n\nThis endpoint does not return [coupon](coupons)\ + \ or [coupon_code](coupon_codes) resources.\n" + operationId: list_discounts_for_a_subscription + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-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:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - discount + type: object + properties: + discount: + $ref: '#/components/schemas/Discount' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/contract_terms: + get: + summary: List contract terms for a subscription + description: | + Retrieves a list of contract term resources for the subscription specified in the path. + operationId: list_contract_terms_for_a_subscription + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(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))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - contract_term + type: object + properties: + contract_term: + $ref: '#/components/schemas/ContractTerm' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/pause: + post: + summary: Pause a subscription + description: | + Pauses the subscription, changing its `status` to `paused`. This prevents the subscription from getting renewed. No new charges are created until the subscription is resumed. + + + + #### Note: + + * Applicable only for **active/non-renewing** subscriptions. + * If paused indefinitely, the subscription is cancelled on the [cancelled_at](/docs/api/subscriptions#subscription_cancelled_at) date. + * Advance charges, if any, are refunded as credits. + + **Warning** + + If there are [ramp](ramps?prod_cat_ver=2)s scheduled for the subscription, this operation deletes any ramps that are set to become effective on or after the subscription's pause time. + operationId: pause_a_subscription + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-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-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + pause_option: + type: string + description: | + List of options to pause the subscription. \* billing_cycles - + + Pause at the end of the current term, and resume automatically after the set number of billing cycles (in [skip_billing_cycles](/docs/api/subscriptions#pause_a_subscription_skip_billing_cycles)) have been skipped + \* immediately - Pause immediately + \* end_of_term - Pause at the end of current term + \* specific_date - Pause on a specific date + deprecated: false + enum: + - immediately + - end_of_term + - specific_date + - billing_cycles + pause_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + Date on which the subscription will be paused. Applicable when `specific_date` option is chosen in the [pause_option](/docs/api/subscriptions#pause_a_subscription_pause_option) field. + + For non-renewing subscriptions, `pause_date` should be before the cancellation date. + format: unix-time + deprecated: false + unbilled_charges_handling: + type: string + description: | + Applicable when unbilled charges are present for the subscription and [pause_option](/docs/api/subscriptions#pause_a_subscription_pause_option) is set as `immediately`. **Note:** On the invoice raised, an automatic charge is attempted on the payment method available, if customer's auto-collection property is set to `on`. + \* invoice - + + Invoice charges + + If `invoice` is chosen, an automatic charge is attempted on the payment method available if the customer has enabled auto-collection. If a payment collection fails or when auto-collection is not enabled, the invoice is closed as unpaid. + \* no_action - + + Retain as unbilled + + If `no_action` is chosen, charges are added to the resumption invoice. + deprecated: false + enum: + - no_action + - invoice + invoice_dunning_handling: + type: string + description: | + Handles dunning for invoices already in the dunning cycle when a subscription is paused. Applicable when [pause_option](/docs/api/subscriptions#pause_a_subscription_pause_option) is set as `immediately`. + + If invoice is in the dunning cycle, `invoice_dunning_handing` allows you to `stop` or `continue` dunning. + \* continue - Continue dunning \* stop - Stop dunning + deprecated: false + enum: + - continue + - stop + skip_billing_cycles: + minimum: 1 + type: integer + description: | + The number of subscription billing cycles that will be skipped. The subscription resumes after the set number of billing cycles have been skipped. This is applicable only when the value of of [pause_option](/docs/api/subscriptions#pause_a_subscription_pause_option) is `billing_cycles`. + format: int32 + deprecated: false + resume_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + For a paused subscription, it is the date/time when the subscription is scheduled to resume. If the pause is for an indefinite period, this value is not returned. + + For non-renewing subscriptions,`resume_date` should be before the cancellation date. + format: unix-time + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - subscription + type: object + properties: + subscription: + $ref: '#/components/schemas/Subscription' + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + invoice: + $ref: '#/components/schemas/Invoice' + unbilled_charges: + type: array + items: + $ref: '#/components/schemas/UnbilledCharge' + credit_notes: + type: array + items: + $ref: '#/components/schemas/CreditNote' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/scheduled_changes: + get: + summary: Scheduled_changes a subscription_scheduled_change + operationId: scheduled_changes_a_subscription_scheduled_change + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([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?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - subscription_scheduled_change + type: object + properties: + subscription_scheduled_change: + $ref: '#/components/schemas/SubscriptionScheduledChange' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/update_scheduled_changes: + post: + summary: Update_scheduled_changes a subscription_scheduled_change + operationId: update_scheduled_changes_a_subscription_scheduled_change + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1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):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + cancel_reason_code: + maxLength: 100 + type: string + deprecated: false + action_type: + type: string + deprecated: false + enum: + - cancel + - pause + - reactivate + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - subscription_scheduled_change + type: object + properties: + subscription_scheduled_change: + $ref: '#/components/schemas/SubscriptionScheduledChange' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/delete: + post: + summary: Delete a customer + description: | + Deletes a particular customer identified by the a unique identifier. + operationId: delete_a_customer + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA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,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + delete_payment_method: + type: boolean + description: | + Deletes the Payment Method from the gateway/vault. + deprecated: false + default: true + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/relationships: + post: + summary: Link a customer to an account hierarchy + description: "Establish a [hierarchical relationship](https://www.chargebee.com/docs/account-hierarchy.html)\ + \ between customers. The path parameter `customer_id` identifies the child\ + \ in this relationship. \n**Prerequisite**\n\nBoth parent and child customers\ + \ must be part of the same [business entity](advanced-features#mbe). \n**Note**\n\ + \n* A customer can have a maximum of 250 direct children.\n* The hierarchy\ + \ allows a maximum of 5 levels from the root node to the lowest child node.\ + \ \n**Note**\n\nFor the `use_default_hierarchy_settings`, `parent_account_access`,\ + \ and `child_account_access` parameters below, the term \"parent\" usually\ + \ refers to the customer with the ID [payment_owner_id](customers#link_a_customer_payment_owner_id).\ + \ However, if the `payment_owner_id` is the same as the child's ID (`{customer_id}`),\ + \ the \"parent\" is identified by [parent_id](customers#link_a_customer_parent_id).\n" + operationId: link_a_customer + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-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})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + parent_id: + maxLength: 50 + type: string + description: | + ID of the customer intended to be set as the immediate parent of the customer identified by `customer_id`. + deprecated: false + payment_owner_id: + maxLength: 50 + type: string + description: | + The `id` of the customer responsible for paying the invoices for the customer identified by `customer_id`. This ID must match either `customer_id` or `invoice_owner_id`. + deprecated: false + invoice_owner_id: + maxLength: 50 + type: string + description: | + The `id` of the customer who receives the invoice for charges incurred by the customer identified by `customer_id`. This ID must match either `customer_id` or one of its ancestors. + deprecated: false + use_default_hierarchy_settings: + type: boolean + description: | + Decides if Chargebee should apply settings from the [Chargebee Billing UI](https://www.chargebee.com/docs/2.0/account-hierarchy.html#advanced-mode) or from this API request. + + * If set to `true`: Chargebee uses settings configured in the Chargebee Billing UI. + * If set to `false`: Settings provided in the `parent_account_access` and `child_account_access` parameters are applied. + deprecated: false + default: true + parent_account_access: + type: object + properties: + portal_edit_child_subscriptions: + type: string + description: | + Determines the parent's access to the child's subscriptions in the Self-Serve Portal. \* yes - The parent can view and edit the child's subscriptions. \* no - The parent can't view or edit the child's subscriptions. \* view_only - The parent can only view the child's subscriptions. + deprecated: false + enum: + - "yes" + - view_only + - "no" + portal_download_child_invoices: + type: string + description: | + Determines the parent's access to the child's invoices in the Self-Serve Portal. \* no - The parent can't view or download the child's invoices. \* view_only - The parent can view but not download the child's invoices. \* yes - The parent can both view and download the child's invoices. + deprecated: false + enum: + - "yes" + - view_only + - "no" + send_subscription_emails: + type: boolean + description: | + If set to `true`, the parent receives email notifications for the child's subscriptions. + deprecated: false + send_payment_emails: + type: boolean + description: | + If set to `true`, the parent receives email notifications for payment-related activities on the child's invoices. + deprecated: false + send_invoice_emails: + type: boolean + description: | + If set to `true`, the parent receives email notifications for the child's invoices. + deprecated: false + description: | + Settings for the parent account's access. + deprecated: false + child_account_access: + type: object + properties: + portal_edit_subscriptions: + type: string + description: | + Determines the child's access to its own subscriptions in the Self-Serve Portal. \* view_only - The child account can only view its subscriptions. \* yes - The child account can view and edit its subscriptions. + deprecated: false + enum: + - "yes" + - view_only + portal_download_invoices: + type: string + description: | + Determines the child's access to its own invoices in the Self-Serve Portal. \* yes - The child account can both view and download its invoices. \* view_only - The child account can view but not download its invoices. \* no - The child account cannot view or download its own invoices. + deprecated: false + enum: + - "yes" + - view_only + - "no" + send_subscription_emails: + type: boolean + description: | + If set to `true`, the child account receives email notifications for its subscriptions. + deprecated: false + send_payment_emails: + type: boolean + description: | + If set to `true`, the child account receives email notifications for payment-related activities for its invoices. + deprecated: false + send_invoice_emails: + type: boolean + description: | + If set to `true`, the child account receives email notifications for its invoices. + deprecated: false + description: | + Settings for the child account's access. + deprecated: false + encoding: + child_account_access: + style: deepObject + explode: true + parent_account_access: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/delete_relationship: + post: + summary: Unlink a customer from its parent account + description: | + When a customer belongs to an [account hierarchy](https://www.chargebee.com/docs/2.0/account-hierarchy.html), this operation detaches the customer from its parent. The hierarchy, if any, beneath the customer remains unchanged. + operationId: delink_a_customer + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?: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(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/delete_contact: + post: + summary: Delete contacts for a customer + description: | + Deletes a particular contact for a customer. You can delete a contact by giving the Contact ID as the input parameter. + operationId: delete_contacts_for_a_customer + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?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,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + contact: + required: + - id + type: object + properties: + id: + maxLength: 150 + type: string + description: | + Unique reference ID provided for the contact. + deprecated: false + description: | + Parameters for contact + deprecated: false + encoding: + contact: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/assign_payment_role: + post: + summary: Assign payment role + description: | + Assign Primary or Backup payment role or unassign role for the payment source based on the preference for the payment collection. + operationId: assign_payment_role + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4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type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - payment_source_id + - role + type: object + properties: + payment_source_id: + maxLength: 40 + type: string + description: | + Payment source id this role will be assigned to. + deprecated: false + role: + type: string + description: | + Indicates whether the payment source is Primary, Backup, or neither. \* backup - Backup \* none - None \* primary - Primary + deprecated: false + enum: + - primary + - backup + - none + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - payment_source + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + payment_source: + $ref: '#/components/schemas/PaymentSource' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/move: + post: + summary: Move a customer + description: | + This API copies a customer object from one site to another. The destination site (the site to which the customer is copied) is specified by the path parameter `{site}`; whereas, the source site (the site from which the customer is copied) is specified by the query parameter `from_site`. + operationId: move_a_customer + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9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fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - from_site + - id_at_from_site + type: object + properties: + id_at_from_site: + maxLength: 100 + type: string + description: | + Id of the customer to be copied. + deprecated: false + from_site: + maxLength: 50 + type: string + description: | + Name of the site from which this customer need to be copied. + deprecated: false + tax_providers_fields: + type: object + properties: + provider_name: + type: array + items: + maxLength: 50 + type: string + deprecated: false + field_id: + type: array + items: + maxLength: 50 + type: string + deprecated: false + field_value: + type: array + items: + maxLength: 50 + type: string + deprecated: false + description: | + Parameters for tax_providers_fields + deprecated: false + encoding: + tax_providers_fields: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - resource_migration + type: object + properties: + resource_migration: + $ref: '#/components/schemas/ResourceMigration' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/hierarchy: + get: + summary: Get account hierarchy for a customer + description: | + Retrieves the full or partial [account hierarchy](/docs/api/hierarchies) for a customer. + operationId: get_hierarchy + parameters: + - name: hierarchy_operation_type + in: query + description: |- + Specifies which part of the account hierarchy to retrieve for the customer identified by {customer_id}. + * complete_hierarchy - Retrieve all nodes in the account hierarchy. + * subordinates - Retrieve all nodes in the account hierarchy that start from the specified customer (identified by {customer_id}) and include its subordinates. In other words, get nodes in the account hierarchy tree where the root node is the specified customer. + * subordinates_with_unbilled_charges_payable_by_parent - List all the nodes of the hierarchy formed by its subordinates with unbilled charges whose payment owner is the customer. + * path_to_root - Retrieve nodes from the specified customer (identified by {customer_id}) to the root of its account hierarchy. + required: true + deprecated: false + style: form + explode: true + schema: + type: string + deprecated: false + enum: + - complete_hierarchy + - subordinates + - path_to_root + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?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a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - hierarchies + type: object + properties: + hierarchies: + type: array + items: + $ref: '#/components/schemas/Hierarchy' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/update_payment_method: + post: + summary: Update payment method for a customer + description: "We recently released [Payment Sources](/docs/api/payment_sources),\ + \ which comes with additional options and improvements to the [Card APIs](/docs/api/cards).\ + \ For this operation, use the [Create using temporary token](/docs/api/payment_sources#create_using_temporary_token)\ + \ API or [Create using permanent token](/docs/api/payment_sources#create_using_permanent_token)\ + \ API under Payment Sources to update payment method for the customer.\n\n\ + Updates payment method details for a customer.\n\n**Note:** If you wish to\ + \ pass the card number, CVV, or the single-use card tokens provided by gateways\ + \ like Stripe, then use the [Update card for a customer](cards#update_card_for_a_customer)\ + \ API under Cards resource. This API is not supported for Chargebee Test Gateway,\ + \ it is provided to help you understand the billing workflow in Chargebee.\n\ + \n**PayPal Express Checkout** \nYou can use this API if you are directly\ + \ integrating PayPal Express Checkout in your website instead of using Chargebee's\ + \ hosted pages. When your customer updates his payment method using PayPal\ + \ Express Checkout, you will be provided with the *Billing Agreement ID* by\ + \ PayPal. You can update the payment method for that customer in Chargebee\ + \ by passing `type` as `paypal_express_checkout` and `reference_id` with the\ + \ *Billing Agreement ID*.\n\n**Login and Pay with Amazon** \nYou can use\ + \ this API if you are directly integrating *Login and Pay with Amazon* in\ + \ your website instead of using Chargebee's hosted pages. When your customer\ + \ updates Amazon as a payment method, you will be provided with the *Billing\ + \ Agreement ID* by Amazon. You can update the payment method for that customer\ + \ in Chargebee by passing `type` as `amazon_payments` and `reference_id` with\ + \ the *Billing Agreement ID*.\n\n**Card Payments** \nWhen the card details\ + \ of your customer are stored in the vault of gateways such as Stripe or Braintree,\ + \ you can use this API to update the *reference id* provided by them in Chargebee.\ + \ To use this API, pass \n\n* `type` as `card`.\n* `gateway` with the gateway\ + \ associated with the card. If the gateway is not specified, the default gateway\ + \ will be used.\n* `reference_id` with the identifier provided by the gateway/Spreedly\ + \ to reference that specific card.\n\n**Reference id format for Card Payments**\ + \ \nThe format of reference_id will differ based on where the card is stored.\ + \ \n**Stripe:** In case of Stripe, the reference_id consists of combination\ + \ of Stripe Customer ID and Stripe Card ID separated by forward slash (e.g.\ + \ *cus_63MnDn0t6kfDW7/card_6WjCF20vT9WN1G*). If you are passing Stripe Customer\ + \ ID alone, then Chargebee will store the card marked as active for that customer\ + \ in Stripe.\n\n**Braintree:** In case of Braintree, the reference_id consists\ + \ of combination of Braintree Customer ID and Braintree Payment Method Token\ + \ separated by forward slash \n(e.g. *cus_63MnDn0t6kfDW7/card_6WjCF20vT9WN1G*\ + \ ). If you are passing Braintree Customer ID alone, then Chargebee will store\ + \ the card marked as default for that customer in Braintree.\n\n**Spreedly\ + \ Card vault:** If the card details are stored in Spreedly vault, then you\ + \ need to provide the Spreedly token as `reference_id`.\n\n**Direct Debit\ + \ Payments** \nWhen the bank account details of your customer are stored\ + \ in the gateway vault, you can use this API to update the reference id provided\ + \ by them in Chargebee. To use this API, pass \n\n* `type` as `direct_debit`.\n\ + * `gateway` with the gateway where the bank account details are stored (e.g.\ + \ *authorize_net*). If the gateway is not specified, the gateway supporting\ + \ the direct debit will be used.\n* `reference_id` with the identifier provided\ + \ by the gateway to reference the customer's bank account details.\n* `tmp_token`\ + \ with the single use token provided by the gateway ( Should be passed only\ + \ if reference_id is not passed ).\n\n**Reference id format for Direct Debit\ + \ Payments** \nThe format of reference_id will differ based on where the\ + \ bank account is stored. \n**Stripe:** In case of Stripe, the reference_id\ + \ consists of combination of Stripe Customer ID and Stripe Bank Account ID\ + \ separated by forward slash \n(e.g. *cus_8suoHaLQH4G5AW/ba_18b8z2KmcbENlhgU03RznRYW*).\ + \ If you are passing Stripe Customer ID alone, then Chargebee will store the\ + \ first bank account details present in payment profile list of that customer\ + \ in Stripe.\n\n**Authorize.Net:** The reference_id consists of combination\ + \ of Authorize.Net's Customer Profile ID and Payment Profile ID separated\ + \ by forward slash (e.g. *2384383/34834382*). If you are passing Authorize.Net's\ + \ Customer Profile ID alone, then Chargebee will store the first bank account\ + \ details present in payment profile list of that customer in Authorize.Net.\n\ + \n**GoCardless:** The reference_id is the GoCardless Customer Mandate ID (e.g.\ + \ *MD0077Z99TTQXK*).\n\n**Note:** While using this API to update payment method\ + \ details, [Card Verification](https://www.chargebee.com/docs/cards.html#card-verification)\ + \ will not happen even if it is enabled for that particular gateway.\n" + operationId: update_payment_method_for_a_customer + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-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(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + payment_method: + required: + - type + type: object + properties: + type: + type: string + description: | + The type of payment method. For more details refer [Update payment method for a customer](customers#update_payment_method_for_a_customer) API under Customer resource. \* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource. \* sepa_instant_transfer - Payments made via Sepa Instant Transfer \* ideal - Payments made via iDEAL. \* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created. \* sofort - Payments made via Sofort. \* alipay - Payments made via Alipay. \* generic - Payments made via Generic Payment Method. \* klarna_pay_now - Payments made via Klarna Pay Now \* netbanking_emandates - Netbanking (eMandates) Payments. \* apple_pay - Payments made via Apple Pay. \* pay_to - Payments made via PayTo \* unionpay - Payments made via UnionPay. \* faster_payments - Payments made via Faster Payments \* bancontact - Payments made via Bancontact Card. \* dotpay - Payments made via Dotpay. \* venmo - Payments made via Venmo \* automated_bank_transfer - Represents virtual bank account using which the payment will be done. \* giropay - Payments made via giropay. \* upi - UPI Payments. \* google_pay - Payments made via Google Pay. \* wechat_pay - Payments made via WeChat Pay. \* amazon_payments - Payments made via Amazon Payments. \* paypal_express_checkout - Payments made via PayPal Express Checkout. + deprecated: false + enum: + - card + - paypal_express_checkout + - amazon_payments + - direct_debit + - generic + - alipay + - unionpay + - wechat_pay + - ideal + - google_pay + - sofort + - bancontact + - giropay + - dotpay + - upi + - netbanking_emandates + - venmo + - pay_to + - faster_payments + - sepa_instant_transfer + - automated_bank_transfer + - klarna_pay_now + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account in which this payment source is stored. + deprecated: false + reference_id: + maxLength: 200 + type: string + description: "The reference id. In the case of Amazon and PayPal\ + \ this will be the *billing agreement id* . For GoCardless\ + \ direct debit this will be 'mandate id'. In the case of card\ + \ this will be the identifier provided by the gateway/card\ + \ vault for the specific payment method resource. **Note:**\ + \ This is not the one-time temporary token provided by gateways\ + \ like Stripe. \nFor more details refer [Update payment\ + \ method for a customer](customers#update_payment_method_for_a_customer)\ + \ API under Customer resource.\n" + deprecated: false + tmp_token: + maxLength: 65000 + type: string + description: | + Single-use toke created by payment gateways. In Stripe, a single-use token is created for direct debit. In Braintree, a nonce is created for PayPal. + deprecated: false + issuing_country: + maxLength: 50 + type: string + description: "[ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\nIf you have enabled [EU\ + \ VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021\ + \ or have [manually\nenabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern\nIreland**) is available as an option.\n" + deprecated: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`checkout_com\`: While adding a new payment method using \[permanent token\](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, \`document\` ID and \`country_of_residence\` are required to support payments through \[dLocal\](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). \* \`payer\`: User related information. \* \`country_of_residence\`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a \[two-character ISO code\](https://docs.checkout.com/resources/codes/country-codes). \* \`document\`: Document ID is the user's \[identification number\](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. \* \`bluesnap\`: While passing raw card details to BlueSnap, if \`fraud_session_id\` is added, \[additional validation\](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your \[BlueSnap fraud session ID\](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. \* \`braintree\`: While passing raw card details to Braintree, your \`fraud_merchant_id\` and the user's \`device_session_id\` can be added to perform \[additional validation\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`fraud_merchant_id\`: Your \[merchant ID\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. \* \`chargebee_payments\`: While passing raw card details to Chargebee Payments, if \`fraud_session_id\` is added, additional validation is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. \* \`bank_of_america\`: While passing raw card details to Bank of America, your user's \`device_session_id\` can be added to perform additional validation and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`ecentric\`: This parameter is used to verify and process payment method details in Ecentric. If the \`merchant_id\` parameter is included, Chargebee will vault it / perform a lookup and verification against this \`merchant_id\`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. \* \`merchant_id\`: Merchant GUID where the card is vaulted or need to be vaulted. \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries and \`device_session_id\` can be added to perform \[additional validation\](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device + deprecated: false + description: | + Parameters for payment_method + deprecated: false + encoding: + payment_method: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}: + get: + summary: Retrieve a customer + description: | + Retrieves the details of the desired customer. You can use the unique identifier for a particular customer to retrieve the desired details. + operationId: retrieve_a_customer + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2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[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + post: + summary: Update a customer + description: | + Updates the customer resource. However, this method cannot be used for updating the 'Billing Info' - the Billing Address and 'vat_number' attributes - of the customer. To update the same, use our [Update Billing Info](/docs/api/customers#update_billing_info_for_a_customer) API. + operationId: update_a_customer + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F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)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + First name of the customer. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + Last name of the customer. + deprecated: false + email: + maxLength: 70 + type: string + description: | + Email of the customer. Configured email notifications will be sent to this email. + format: email + deprecated: false + preferred_currency_code: + maxLength: 3 + type: string + description: | + The currency code (ISO 4217 format) of the customer. Applicable if Multicurrency is enabled. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + Phone number of the customer. + deprecated: false + company: + maxLength: 250 + type: string + description: | + Company name of the customer. + deprecated: false + auto_collection: + type: string + description: | + Whether payments needs to be collected automatically for this customer. \* on - Whenever an invoice is created, an automatic attempt to charge the customer's payment method is made. \* off - Automatic collection of charges will not be made. All payments must be recorded offline. + deprecated: false + default: "on" + enum: + - "on" + - "off" + allow_direct_debit: + type: boolean + description: | + Whether the customer can pay via Direct Debit. + deprecated: false + default: false + net_term_days: + type: integer + description: | + The number of days within which the customer has to make payment for the invoice. . + format: int32 + deprecated: false + default: 0 + taxability: + type: string + description: | + Specifies if the customer is liable for tax. \* taxable - Computes tax for the customer based on the [site configuration](https://www.chargebee.com/docs/tax.html). In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero. \* exempt - + + * Customer is exempted from tax. When using Chargebee's native [Taxes](https://www.chargebee.com/docs/tax.html) feature or when using the [TaxJar integration](https://www.chargebee.com/docs/taxjar.html), no other action is needed. + * However, when using our [Avalara integration](https://www.chargebee.com/docs/avalara.html), optionally, specify `entity_code` or `exempt_number` attributes if you use Chargebee's [AvaTax for Sales](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) or specify `exemption_details` attribute if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. Tax may still be applied by Avalara for certain values of `entity_code`/`exempt_number`/`exemption_details` based on the state/region/province of the taxable address. + deprecated: false + default: taxable + enum: + - taxable + - exempt + exemption_details: + type: array + description: "Indicates the exemption information. You can customize\ + \ customer exemption based on specific Location, Tax level (Federal,\ + \ State, County and Local), Category of Tax or specific Tax Name.\ + \ This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\ + \ integration. \nTo know more about what values you need to provide,\ + \ refer to this [Avalara's API document](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/exemption/).\n" + deprecated: false + items: {} + customer_type: + type: string + description: | + Indicates the type of the customer. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. \* senior_citizen - When the purchase is made by a customer who meets the jurisdiction requirements to be considered a senior citizen and qualifies for senior citizen tax breaks \* industrial - When the purchase is made by an industrial business \* business - When the purchase is made at a place of business \* residential - When the purchase is made by a customer for home use + deprecated: false + enum: + - residential + - business + - senior_citizen + - industrial + client_profile_id: + maxLength: 50 + type: string + description: | + Indicates the Client profile id for the customer. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. + deprecated: false + taxjar_exemption_category: + type: string + description: | + Indicates the exemption type of the customer. This is applicable only if you use Chargebee's TaxJar integration. \* government - Government \* other - Other \* wholesale - Whole-sale + deprecated: false + enum: + - wholesale + - government + - other + locale: + maxLength: 50 + type: string + description: | + Determines which region-specific language Chargebee uses to communicate with the customer. In the absence of the locale attribute, Chargebee will use your site's default language for customer communication. + deprecated: false + entity_code: + type: string + description: | + The exemption category of the customer, for USA and Canada. Applicable if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption). \* med2 - US Medical Device Excise Tax with taxable sales tax \* med1 - US Medical Device Excise Tax with exempt sales tax \* d - Foreign diplomat \* e - Charitable or benevolent organization \* f - Religious organization \* g - Resale \* a - Federal government \* b - State government \* c - Tribe/Status Indian/Indian Band \* l - Other or custom \* m - Educational organization \* n - Local government \* h - Commercial agricultural production \* i - Industrial production/manufacturer \* j - Direct pay permit \* k - Direct mail \* p - Commercial aquaculture \* q - Commercial Fishery \* r - Non-resident + deprecated: false + enum: + - a + - b + - c + - d + - e + - f + - g + - h + - i + - j + - k + - l + - m + - "n" + - p + - q + - r + - med1 + - med2 + exempt_number: + maxLength: 100 + type: string + description: | + Any string value that will cause the sale to be exempted. Use this if your finance team manually verifies and tracks exemption certificates. Applicable if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption). + deprecated: false + offline_payment_method: + type: string + description: | + The preferred offline payment method for the customer. \* custom - Custom \* bank_transfer - Bank Transfer \* boleto - Boleto \* jp_automated_bank_transfer - JP Automated Bank Transfer \* sepa_credit - SEPA Credit \* cash - Cash \* check - Check \* mx_automated_bank_transfer - MX Automated Bank Transfer \* no_preference - No Preference \* us_automated_bank_transfer - US Automated Bank Transfer \* eu_automated_bank_transfer - EU Automated Bank Transfer \* ach_credit - ACH Credit \* uk_automated_bank_transfer - UK Automated Bank Transfer + deprecated: false + enum: + - no_preference + - cash + - check + - bank_transfer + - ach_credit + - sepa_credit + - boleto + - us_automated_bank_transfer + - eu_automated_bank_transfer + - uk_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + - custom + invoice_notes: + maxLength: 2000 + type: string + description: | + A customer-facing note added to all invoices associated with this API resource. This note becomes one among [all the notes](/docs/api/invoices#invoice_notes) displayed on the invoice PDF. + deprecated: false + auto_close_invoices: + type: boolean + description: | + Override for this customer, the [site-level setting](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing) for auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute is also available at the [subscription level](/docs/api/subscriptions?prod_cat_ver=2#subscription_auto_close_invoices) which takes precedence. + deprecated: false + meta_data: + type: object + additionalProperties: true + description: | + A collection of key-value pairs that provides extra information about the customer. \*\*Note:\*\* There's a character limit of 65,535. \[Learn more\](advanced-features?prod_cat_ver=2#metadata). + deprecated: false + fraud_flag: + type: string + description: | + Indicates whether or not the customer has been identified as fraudulent. \* fraudulent - The customer has been marked as fraudulent \* suspicious - The customer has been identified as potentially fraudulent by the gateway \* safe - The customer has been marked as safe + deprecated: false + enum: + - safe + - fraudulent + consolidated_invoicing: + type: boolean + description: "Indicates whether invoices raised on the same day\ + \ for the `customer` are consolidated. When provided, this overrides\ + \ the default configuration at the [site-level](https://www.chargebee.com/docs/consolidated-invoicing.html#configuring-consolidated-invoicing).\ + \ This parameter can be provided only when [Consolidated Invoicing](https://www.chargebee.com/docs/consolidated-invoicing.html)\ + \ is enabled. \n**Note:**\n\nAny invoices raised when a subscription\ + \ activates from `in_trial` or `future` `status`, are not consolidated\ + \ by default. [Contact Support](https://chargebee.freshdesk.com/support/home)\ + \ to enable consolidation for such invoices.\n.\n" + deprecated: false + tax_providers_fields: + type: object + properties: + provider_name: + type: array + items: + maxLength: 50 + type: string + deprecated: false + field_id: + type: array + items: + maxLength: 50 + type: string + deprecated: false + field_value: + type: array + items: + maxLength: 50 + type: string + deprecated: false + description: | + Parameters for tax_providers_fields + deprecated: false + additionalProperties: true + encoding: + tax_providers_fields: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/change_billing_date: + post: + summary: Change billing date + description: | + Applicable when *calendar billing* (with customer specific billing date support) is enabled. Changes the customer's *billing_date* and/or *billing_day_of_week*. + operationId: change_billing_date + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(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?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + billing_date: + maximum: 31 + minimum: 1 + type: integer + description: | + Applicable when *calendar billing* (with customer specific billing date support) is enabled. When set, renewals of all the monthly and yearly subscriptions of this customer will be aligned to this date. + format: int32 + deprecated: false + billing_month: + maximum: 12 + minimum: 1 + type: integer + description: "`billing_month`, together with `billing_date`, specify,\ + \ for this customer, the day of the year when the renewals of\ + \ all the year-based subscriptions take place.\n\nFor example,\ + \ the renewals happen on 15th July when `billing_month` is `7`\ + \ and `billing_date` is `15`. \n**Note**\n\nApplicable when [Calendar\ + \ Billing](https://www.chargebee.com/docs/calendar-billing.html)\ + \ (with customer-specific billing date support) is enabled and\ + \ `billing_date_mode` is `manually_set`.\n" + format: int32 + deprecated: false + billing_date_mode: + type: string + description: | + Indicates whether this customer's *billing_date* value is derived as per configurations or its specifically set (overriden). When specifically set, the *billing_date* will not be reset even when all of the monthly/yearly subscriptions are cancelled. \* manually_set - Billing date is specifically set (default configuration is overridden) \* using_defaults - Billing date is set based on defaults configured. + deprecated: false + enum: + - using_defaults + - manually_set + billing_day_of_week: + type: string + description: | + Applicable when *calendar billing* (with customer specific billing date support) is enabled. When set, renewals of all the weekly subscriptions of this customer will be aligned to this week day. \* sunday - Sunday \* wednesday - Wednesday \* tuesday - Tuesday \* monday - Monday \* saturday - Saturday \* friday - Friday \* thursday - Thursday + deprecated: false + enum: + - sunday + - monday + - tuesday + - wednesday + - thursday + - friday + - saturday + billing_day_of_week_mode: + type: string + description: | + Indicates whether this customer's *billing_day_of_week* value is derived as per configurations or its specifically set (overriden). When specifically set, the *billing_day_of_week* will not be reset even when all of the weekly subscriptions are cancelled. \* manually_set - Billing date is specifically set (default configuration is overridden) \* using_defaults - Billing date is set based on defaults configured. + deprecated: false + enum: + - using_defaults + - manually_set + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers: + get: + summary: List customers + description: | + Retrieves a list of customers added to your Chargebee site. The list contains the necessary customer details such as First Name, Last Name and the Customer ID. + operationId: list_customers + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?: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fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: include_deleted + in: query + description: "If set to true, includes the deleted resources in the response.\ + \ For the deleted resources in the response, the 'deleted'\ + \ attribute will be 'true'." + required: false + style: form + explode: true + schema: + type: boolean + default: false + - name: id + in: query + description: "optional, string filter
Identifier\ + \ of the customer.
Supported operators : is, is_not, starts_with,\ + \ in, not_in

Example id[is]\ + \ = \"9bsvnHgsvmsI\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: 9bsvnHgsvmsI + deprecated: false + - name: first_name + in: query + description: "optional, string filter
First\ + \ name of the customer.
Supported operators : is, is_not, starts_with,\ + \ is_present

Example first_name[is]\ + \ = \"John\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + example: John + deprecated: false + - name: last_name + in: query + description: "optional, string filter
Last\ + \ name of the customer.
Supported operators : is, is_not, starts_with,\ + \ is_present

Example last_name[is]\ + \ = \"Clint\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + example: Clint + deprecated: false + - name: email + in: query + description: "optional, string filter
Email\ + \ of the customer. Configured email notifications will be sent to this email.
Supported\ + \ operators : is, is_not, starts_with, is_present

Example\ + \ email[is] = \"john@test.com\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + example: john@test.com + deprecated: false + - name: company + in: query + description: "optional, string filter
Company\ + \ name of the customer.
Supported operators : is, is_not, starts_with,\ + \ is_present

Example company[is_not]\ + \ = \"Globex Corp\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + example: Globex Corp + deprecated: false + - name: phone + in: query + description: "optional, string filter
Phone\ + \ number of the customer.
Supported operators : is, is_not, starts_with,\ + \ is_present

Example phone[is_not]\ + \ = \"(541) 754-3010\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + example: (541) 754-3010 + deprecated: false + - name: auto_collection + in: query + description: "optional, enumerated string filter
Whether\ + \ payments needs to be collected automatically for this customer. Possible\ + \ values are : on, off.
Supported operators : is, is_not,\ + \ in, not_in

Example auto_collection[is]\ + \ = \"on\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`on\` - Whenever an invoice is created, an automatic attempt to charge the customer's payment method is made. \* \`off\` - Automatic collection of charges will not be made. All payments must be recorded offline. + enum: + - "on" + - "off" + is_not: + type: string + description: | + \* \`on\` - Whenever an invoice is created, an automatic attempt to charge the customer's payment method is made. \* \`off\` - Automatic collection of charges will not be made. All payments must be recorded offline. + enum: + - "on" + - "off" + in: + pattern: "^\\[(on|off)(,(on|off))*\\]$" + type: string + not_in: + pattern: "^\\[(on|off)(,(on|off))*\\]$" + type: string + example: "on" + deprecated: false + - name: taxability + in: query + description: "optional, enumerated string filter
Specifies\ + \ if the customer is liable for tax. Possible values are : taxable,\ + \ exempt.
Supported operators : is, is_not, in, not_in

Example\ + \ taxability[is] = \"taxable\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`taxable\` - Computes tax for the customer based on the [site configuration](https://www.chargebee.com/docs/tax.html). In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero. \* \`exempt\` - + + * Customer is exempted from tax. When using Chargebee's native [Taxes](https://www.chargebee.com/docs/tax.html) feature or when using the [TaxJar integration](https://www.chargebee.com/docs/taxjar.html), no other action is needed. + * However, when using our [Avalara integration](https://www.chargebee.com/docs/avalara.html), optionally, specify `entity_code` or `exempt_number` attributes if you use Chargebee's [AvaTax for Sales](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) or specify `exemption_details` attribute if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. Tax may still be applied by Avalara for certain values of `entity_code`/`exempt_number`/`exemption_details` based on the state/region/province of the taxable address. + enum: + - taxable + - exempt + is_not: + type: string + description: | + \* \`taxable\` - Computes tax for the customer based on the [site configuration](https://www.chargebee.com/docs/tax.html). In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero. \* \`exempt\` - + + * Customer is exempted from tax. When using Chargebee's native [Taxes](https://www.chargebee.com/docs/tax.html) feature or when using the [TaxJar integration](https://www.chargebee.com/docs/taxjar.html), no other action is needed. + * However, when using our [Avalara integration](https://www.chargebee.com/docs/avalara.html), optionally, specify `entity_code` or `exempt_number` attributes if you use Chargebee's [AvaTax for Sales](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) or specify `exemption_details` attribute if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. Tax may still be applied by Avalara for certain values of `entity_code`/`exempt_number`/`exemption_details` based on the state/region/province of the taxable address. + enum: + - taxable + - exempt + in: + pattern: "^\\[(taxable|exempt)(,(taxable|exempt))*\\]$" + type: string + not_in: + pattern: "^\\[(taxable|exempt)(,(taxable|exempt))*\\]$" + type: string + example: taxable + deprecated: false + - name: created_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
Timestamp indicating when this customer resource is created.
Supported\ + \ operators : after, before, on, between

Example created_at[before] = \"1435054328\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1435054328" + deprecated: false + - name: updated_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
To filter based on updated_at. This attribute\ + \ will be present only if the resource has been updated after 2016-09-28.\ + \ It is advisable when using this filter, to pass the sort_by\ + \ input parameter as updated_at for a faster response.
Supported\ + \ operators : after, before, on, between

Example updated_at[after] = \"1243545465\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1243545465" + deprecated: false + - name: business_entity_id + in: query + description: "optional, string filter
The\ + \ unique ID of the business\ + \ entity of this subscription. This is always the same as the \nbusiness\ + \ entity of the customer. \n
Supported operators : is, is_not, starts_with

Example\ + \ business_entity_id[is_not]\ + \ = \"business_entity_id\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + example: business_entity_id + deprecated: false + - name: offline_payment_method + in: query + description: "optional, enumerated string filter
The\ + \ preferred offline payment method for the customer. Possible values are\ + \ : no_preference, cash, check, bank_transfer, ach_credit, sepa_credit.
Supported\ + \ operators : is, is_not, in, not_in

Example offline_payment_method[is] = \"cash\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`no_preference\` - No Preference \* \`cash\` - Cash \* \`check\` - Check \* \`bank_transfer\` - Bank Transfer \* \`ach_credit\` - ACH Credit \* \`sepa_credit\` - SEPA Credit \* \`boleto\` - Boleto \* \`us_automated_bank_transfer\` - US Automated Bank Transfer \* \`eu_automated_bank_transfer\` - EU Automated Bank Transfer \* \`uk_automated_bank_transfer\` - UK Automated Bank Transfer \* \`jp_automated_bank_transfer\` - JP Automated Bank Transfer \* \`mx_automated_bank_transfer\` - MX Automated Bank Transfer \* \`custom\` - Custom + enum: + - no_preference + - cash + - check + - bank_transfer + - ach_credit + - sepa_credit + - boleto + - us_automated_bank_transfer + - eu_automated_bank_transfer + - uk_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + - custom + is_not: + type: string + description: | + \* \`no_preference\` - No Preference \* \`cash\` - Cash \* \`check\` - Check \* \`bank_transfer\` - Bank Transfer \* \`ach_credit\` - ACH Credit \* \`sepa_credit\` - SEPA Credit \* \`boleto\` - Boleto \* \`us_automated_bank_transfer\` - US Automated Bank Transfer \* \`eu_automated_bank_transfer\` - EU Automated Bank Transfer \* \`uk_automated_bank_transfer\` - UK Automated Bank Transfer \* \`jp_automated_bank_transfer\` - JP Automated Bank Transfer \* \`mx_automated_bank_transfer\` - MX Automated Bank Transfer \* \`custom\` - Custom + enum: + - no_preference + - cash + - check + - bank_transfer + - ach_credit + - sepa_credit + - boleto + - us_automated_bank_transfer + - eu_automated_bank_transfer + - uk_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + - custom + in: + pattern: "^\\[(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom)(,(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom)(,(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom))*\\\ + ]$" + type: string + example: cash + deprecated: false + - name: auto_close_invoices + in: query + description: "optional, boolean filter
Override\ + \ for this customer, the site-level setting for\ + \ auto-closing invoices. Only applicable when auto-closing invoices has\ + \ been enabled for the site. This attribute is also available at the subscription level which takes precedence. Possible values are : true,\ + \ false
Supported operators : is

Example auto_close_invoices[is] = \"true\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + example: "true" + deprecated: false + - name: channel + in: query + description: "optional, enumerated string filter
The\ + \ subscription channel this object originated from and is maintained in.\ + \ Possible values are : web, app_store, play_store.
Supported\ + \ operators : is, is_not, in, not_in

Example channel[is] = \"APP STORE\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: "\\* \\`web\\` - The object was created (and is maintained)\ + \ for the web channel directly in Chargebee via API or UI. \\* \\\ + `app_store\\` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this object via\ + \ UI or API is disallowed. \\* \\`play_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of this object\ + \ via UI or API is disallowed. \n\nIn-App Subscriptions is currently\ + \ in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com)\ + \ for more information.\n" + enum: + - web + - app_store + - play_store + is_not: + type: string + description: "\\* \\`web\\` - The object was created (and is maintained)\ + \ for the web channel directly in Chargebee via API or UI. \\* \\\ + `app_store\\` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this object via\ + \ UI or API is disallowed. \\* \\`play_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of this object\ + \ via UI or API is disallowed. \n\nIn-App Subscriptions is currently\ + \ in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com)\ + \ for more information.\n" + enum: + - web + - app_store + - play_store + in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + example: APP STORE + deprecated: false + - name: sort_by + in: query + description: "optional, string filter
Sorts\ + \ based on the specified attribute.
Supported attributes : created_at,\ + \ updated_at
Supported sort-orders : asc, desc

Example\ + \ sort_by[asc] = \"created_at\"\ +
This will sort the result based on the 'created_at' attribute in\ + \ ascending(earliest first) order." + required: false + style: deepObject + explode: true + schema: + minProperties: 1 + type: object + properties: + asc: + type: string + enum: + - created_at + - updated_at + desc: + type: string + enum: + - created_at + - updated_at + additionalProperties: false + - name: relationship + in: query + description: Parameters for relationship + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + parent_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + description: | + Immediate parent with whom we will link our new customer(child) + example: future_billing + deprecated: false + payment_owner_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + description: | + Parent who is going to pay + example: active1 + deprecated: false + invoice_owner_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + description: | + Parent who is going to handle invoices + example: future_billing + deprecated: false + deprecated: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - customer + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + post: + summary: Create a customer + description: | + **Note:** This operation optionally supports 3DS verification flow. To achieve the same, create the [Payment Intent](/docs/api/3ds_card_payments?prod_cat_ver=1) and pass it as input parameter to this API. + + Creates a customer. You can create a customer and then create subscriptions for the customer when required. When creating a customer, you can pass along the billing address and card details. + + Passing raw card data via API involves PCI liability at your end due to the sensitivity of the data. Instead, you can use one of the following integration options as applicable: + + Here's some resources you can use to collect card information within your checkout form based on the payment gateway you use: + + * [Stripe.js](https://stripe.com/docs/js) for Stripe users. + * [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2) for Braintree users. + * [Accept.js](https://developer.authorize.net/api/reference/features/acceptjs.html), if you use [Authorize.Net](https://www.authorize.net/). + * If you are using the Adyen gateway, you will have to use the Adyen's [Client-Side Encryption](https://docs.adyen.com/online-payments/classic-integrations/api-integration-ecommerce/cse-integration-ecommerce) to encrypt sensitive cardholder data. Once the cardholder data is encrypted, pass the value in `adyen.encrypted.data`as temp token in this API. + * You can also use our [Hosted Pages](https://www.chargebee.com/docs/1.0/hosted_pages.html) based integration. + + When billing address is not passed (say, for customers making offline payments), you can always provide it later using the [Update billing info for a customer API](/docs/api/customers#update_billing_info_for_a_customer). + + **Note:**When an invoice is generated for a customer, the billing address provided for the customer is stored with the invoice. If the First Name, Last Name, and Company fields of the billing address do not contain any information, they're picked up from the customer details. + operationId: create_a_customer + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4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?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + id: + maxLength: 50 + type: string + description: | + Id for the new customer. If not given, this will be auto-generated. + deprecated: false + first_name: + maxLength: 150 + type: string + description: | + First name of the customer. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + Last name of the customer. + deprecated: false + email: + maxLength: 70 + type: string + description: | + Email of the customer. Configured email notifications will be sent to this email. + format: email + deprecated: false + preferred_currency_code: + maxLength: 3 + type: string + description: | + The currency code (ISO 4217 format) of the customer. Applicable if Multicurrency is enabled. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + Phone number of the customer. + deprecated: false + company: + maxLength: 250 + type: string + description: | + Company name of the customer. + deprecated: false + auto_collection: + type: string + description: | + Whether payments needs to be collected automatically for this customer. \* on - Whenever an invoice is created, an automatic attempt to charge the customer's payment method is made. \* off - Automatic collection of charges will not be made. All payments must be recorded offline. + deprecated: false + default: "on" + enum: + - "on" + - "off" + net_term_days: + type: integer + description: | + The number of days within which the customer has to make payment for the invoice. . + format: int32 + deprecated: false + default: 0 + allow_direct_debit: + type: boolean + description: | + Whether the customer can pay via Direct Debit. + deprecated: false + default: false + vat_number: + maxLength: 20 + type: string + description: | + The VAT/tax registration number for the customer. For customers with [billing_address](customers#customer_billing_address) `country` as `XI` (which is **United Kingdom - Northern Ireland** ), the first two characters of the [full VAT + number](https://en.wikipedia.org/wiki/VAT_identification_number) can be overridden by setting [vat_number_prefix](customers#customer_vat_number_prefix). + deprecated: false + vat_number_prefix: + maxLength: 10 + type: string + description: "An overridden value for the first two characters of\ + \ the [full VAT\nnumber](https://en.wikipedia.org/wiki/VAT_identification_number).\ + \ Only applicable specifically for customers with [billing_address](customers#customer_billing_address)\ + \ `country` as `XI` (which is **United Kingdom - Northern Ireland**\ + \ ). \n\nWhen you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or have [manually\nenabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, you have the option of setting [billing_address](customers#customer_billing_address)\ + \ `country` as `XI`. That's the code for **United Kingdom - Northern\n\ + Ireland** . The first two characters of the VAT number in such\ + \ a case is `XI` by default. However, if the VAT number was registered\ + \ in UK, the value should be `GB`. Set `vat_number_prefix` to\ + \ `GB` for such cases.\n" + deprecated: false + entity_identifier_scheme: + maxLength: 50 + type: string + description: "The Peppol BIS scheme associated with the [vat_number](customers#customer_vat_number)\ + \ of the customer. This helps identify the specific type of customer\ + \ entity. For example, `DE:VAT` is used for a German business\ + \ entity while `DE:LWID45` is used for a German government entity.\ + \ The value must be from the list of possible values and must\ + \ correspond to the country provided under `billing_address.country`.\ + \ See [list of possible values](https://www.chargebee.com/docs/e-invoicing.html#supported-countries).\ + \ \n**Tip:**\n\n\nIf there are additional entity identifiers\ + \ for the customer not associated with the `vat_number`, they\ + \ can be provided as the `entity_identifiers[]` array.\n.\n" + deprecated: false + entity_identifier_standard: + maxLength: 50 + type: string + description: "The standard used for specifying the `entity_identifier_scheme`.\ + \ Currently only `iso6523-actorid-upis` is supported and is used\ + \ by default when not provided. \n**Tip:**\n\n\nIf there are\ + \ additional entity identifiers for the customer not associated\ + \ with the `vat_number`, they can be provided as the `entity_identifiers[]`\ + \ array.\n.\n" + deprecated: false + default: iso6523-actorid-upis + registered_for_gst: + type: boolean + description: | + Confirms that a customer is registered under GST. If set to `true` then the [Reverse Charge Mechanism](https://www.chargebee.com/docs/australian-gst.html#reverse-charge-mechanism) is applicable. This field is applicable only when Australian GST is configured for your site. + deprecated: false + is_einvoice_enabled: + type: boolean + description: "Determines whether the customer is e-invoiced. When\ + \ set to `true` or not set to any value, the customer is e-invoiced\ + \ so long as e-invoicing is enabled for their country (`billing_address.country`).\ + \ When set to `false`, the customer is not e-invoiced even if\ + \ e-invoicing is enabled for their country. \n**Tip:**\n\n\n\ + It is possible to set a value for this flag even when E-Invoicing\ + \ is disabled. However, it comes into effect only when E-Invoicing\ + \ is enabled.\n.\n" + deprecated: false + einvoicing_method: + type: string + description: | + Determines whether to send an e-invoice manually or automatic. \* automatic - Use this value to send e-invoice every time an invoice or credit note is created. \* manual - When manual is selected the automatic e-invoice sending is disabled. Use this value to send e-invoice manually through UI or API. \* site_default - The default value of the site which can be overridden at the customer level. + deprecated: false + enum: + - automatic + - manual + - site_default + taxability: + type: string + description: | + Specifies if the customer is liable for tax. \* taxable - Computes tax for the customer based on the [site configuration](https://www.chargebee.com/docs/tax.html). In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero. \* exempt - + + * Customer is exempted from tax. When using Chargebee's native [Taxes](https://www.chargebee.com/docs/tax.html) feature or when using the [TaxJar integration](https://www.chargebee.com/docs/taxjar.html), no other action is needed. + * However, when using our [Avalara integration](https://www.chargebee.com/docs/avalara.html), optionally, specify `entity_code` or `exempt_number` attributes if you use Chargebee's [AvaTax for Sales](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) or specify `exemption_details` attribute if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. Tax may still be applied by Avalara for certain values of `entity_code`/`exempt_number`/`exemption_details` based on the state/region/province of the taxable address. + deprecated: false + default: taxable + enum: + - taxable + - exempt + exemption_details: + type: array + description: "Indicates the exemption information. You can customize\ + \ customer exemption based on specific Location, Tax level (Federal,\ + \ State, County and Local), Category of Tax or specific Tax Name.\ + \ This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\ + \ integration. \nTo know more about what values you need to provide,\ + \ refer to this [Avalara's API document](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/exemption/).\n" + deprecated: false + items: {} + customer_type: + type: string + description: | + Indicates the type of the customer. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. \* industrial - When the purchase is made by an industrial business \* residential - When the purchase is made by a customer for home use \* senior_citizen - When the purchase is made by a customer who meets the jurisdiction requirements to be considered a senior citizen and qualifies for senior citizen tax breaks \* business - When the purchase is made at a place of business + deprecated: false + enum: + - residential + - business + - senior_citizen + - industrial + client_profile_id: + maxLength: 50 + type: string + description: | + Indicates the Client profile id for the customer. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. + deprecated: false + taxjar_exemption_category: + type: string + description: | + Indicates the exemption type of the customer. This is applicable only if you use Chargebee's TaxJar integration. \* other - Other \* government - Government \* wholesale - Whole-sale + deprecated: false + enum: + - wholesale + - government + - other + business_customer_without_vat_number: + type: boolean + description: | + Confirms that a customer is a valid business without an EU/UK VAT number. + deprecated: false + locale: + maxLength: 50 + type: string + description: | + Determines which region-specific language Chargebee uses to communicate with the customer. In the absence of the locale attribute, Chargebee will use your site's default language for customer communication. + deprecated: false + entity_code: + type: string + description: | + The exemption category of the customer, for USA and Canada. Applicable if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption). \* l - Other or custom \* m - Educational organization \* n - Local government \* h - Commercial agricultural production \* i - Industrial production/manufacturer \* j - Direct pay permit \* k - Direct mail \* p - Commercial aquaculture \* q - Commercial Fishery \* r - Non-resident \* d - Foreign diplomat \* e - Charitable or benevolent organization \* f - Religious organization \* g - Resale \* a - Federal government \* b - State government \* c - Tribe/Status Indian/Indian Band \* med2 - US Medical Device Excise Tax with taxable sales tax \* med1 - US Medical Device Excise Tax with exempt sales tax + deprecated: false + enum: + - a + - b + - c + - d + - e + - f + - g + - h + - i + - j + - k + - l + - m + - "n" + - p + - q + - r + - med1 + - med2 + exempt_number: + maxLength: 100 + type: string + description: | + Any string value that will cause the sale to be exempted. Use this if your finance team manually verifies and tracks exemption certificates. Applicable if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption). + deprecated: false + meta_data: + type: object + additionalProperties: true + description: | + A collection of key-value pairs that provides extra information about the customer. \*\*Note:\*\* There's a character limit of 65,535. \[Learn more\](advanced-features?prod_cat_ver=2#metadata). + deprecated: false + offline_payment_method: + type: string + description: | + The preferred offline payment method for the customer. \* sepa_credit - SEPA Credit \* cash - Cash \* no_preference - No Preference \* bank_transfer - Bank Transfer \* check - Check \* eu_automated_bank_transfer - EU Automated Bank Transfer \* jp_automated_bank_transfer - JP Automated Bank Transfer \* uk_automated_bank_transfer - UK Automated Bank Transfer \* custom - Custom \* boleto - Boleto \* mx_automated_bank_transfer - MX Automated Bank Transfer \* us_automated_bank_transfer - US Automated Bank Transfer \* ach_credit - ACH Credit + deprecated: false + enum: + - no_preference + - cash + - check + - bank_transfer + - ach_credit + - sepa_credit + - boleto + - us_automated_bank_transfer + - eu_automated_bank_transfer + - uk_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + - custom + auto_close_invoices: + type: boolean + description: | + Override for this customer, the [site-level setting](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing) for auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute is also available at the [subscription level](/docs/api/subscriptions?prod_cat_ver=2#subscription_auto_close_invoices) which takes precedence. + deprecated: false + consolidated_invoicing: + type: boolean + description: "Indicates whether invoices raised on the same day\ + \ for the `customer` are consolidated. When provided, this overrides\ + \ the default configuration at the [site-level](https://www.chargebee.com/docs/consolidated-invoicing.html#configuring-consolidated-invoicing).\ + \ This parameter can be provided only when [Consolidated Invoicing](https://www.chargebee.com/docs/consolidated-invoicing.html)\ + \ is enabled. \n**Note:**\n\nAny invoices raised when a subscription\ + \ activates from `in_trial` or `future` `status`, are not consolidated\ + \ by default. [Contact Support](https://chargebee.freshdesk.com/support/home)\ + \ to enable consolidation for such invoices.\n.\n" + deprecated: false + token_id: + maxLength: 40 + type: string + description: | + The Chargebee payment token generated by Chargebee JS. + deprecated: false + business_entity_id: + maxLength: 50 + type: string + description: "The unique ID of the [business entity](https://apidocs.chargebee.com/docs/api/advanced-features?prod_cat_ver=2#mbe)\ + \ this customer should be [linked](https://apidocs.chargebee.com/docs/api/advanced-features?prod_cat_ver=2#mbe-linked-be)\ + \ to. Applicable only when multiple business entities have been\ + \ created for the site. When not provided, the customer is linked\ + \ to the [default business entity](https://apidocs.chargebee.com/docs/api/advanced-features?prod_cat_ver=2#mbe-default-be)\ + \ defined for the site. \n**Note**\n\nAn alternative way of passing\ + \ this parameter is by means of a [custom HTTP header](https://apidocs.chargebee.com/docs/api/advanced-features?prod_cat_ver=2#mbe-header-main).\n\ + .\n" + deprecated: false + invoice_notes: + maxLength: 2000 + type: string + description: | + A customer-facing note added to all invoices associated with this API resource. This note becomes one among [all the notes](/docs/api/invoices#invoice_notes) displayed on the invoice PDF. + deprecated: false + card: + type: object + properties: + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account in which this payment source is stored. + deprecated: false + first_name: + maxLength: 50 + type: string + description: | + Cardholder's first name + deprecated: false + last_name: + maxLength: 50 + type: string + description: | + Cardholder's last name + deprecated: false + number: + maxLength: 1500 + type: string + description: | + The credit card number without any format. If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js), you can specify the Braintree encrypted card number here. + deprecated: false + expiry_month: + maximum: 12 + minimum: 1 + type: integer + description: | + Card expiry month. + format: int32 + deprecated: false + expiry_year: + type: integer + description: | + Card expiry year. + format: int32 + deprecated: false + cvv: + maxLength: 520 + type: string + description: | + The card verification value (CVV). If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js), you can specify the Braintree encrypted CVV here. + deprecated: false + billing_addr1: + maxLength: 150 + type: string + description: | + Address line 1, as available in card billing address. + deprecated: false + billing_addr2: + maxLength: 150 + type: string + description: | + Address line 2, as available in card billing address. + deprecated: false + billing_city: + maxLength: 50 + type: string + description: | + City, as available in card billing address. + deprecated: false + billing_state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + billing_state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + billing_zip: + maxLength: 20 + type: string + description: | + Postal or Zip code, as available in card billing address. + deprecated: false + billing_country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`checkout_com\`: While adding a new payment method using \[permanent token\](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, \`document\` ID and \`country_of_residence\` are required to support payments through \[dLocal\](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). \* \`payer\`: User related information. \* \`country_of_residence\`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a \[two-character ISO code\](https://docs.checkout.com/resources/codes/country-codes). \* \`document\`: Document ID is the user's \[identification number\](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. \* \`bluesnap\`: While passing raw card details to BlueSnap, if \`fraud_session_id\` is added, \[additional validation\](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your \[BlueSnap fraud session ID\](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. \* \`braintree\`: While passing raw card details to Braintree, your \`fraud_merchant_id\` and the user's \`device_session_id\` can be added to perform \[additional validation\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`fraud_merchant_id\`: Your \[merchant ID\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. \* \`chargebee_payments\`: While passing raw card details to Chargebee Payments, if \`fraud_session_id\` is added, additional validation is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. \* \`bank_of_america\`: While passing raw card details to Bank of America, your user's \`device_session_id\` can be added to perform additional validation and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`ecentric\`: This parameter is used to verify and process payment method details in Ecentric. If the \`merchant_id\` parameter is included, Chargebee will vault it / perform a lookup and verification against this \`merchant_id\`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. \* \`merchant_id\`: Merchant GUID where the card is vaulted or need to be vaulted. \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries and \`device_session_id\` can be added to perform \[additional validation\](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device + deprecated: false + description: | + Parameters for card + deprecated: false + bank_account: + type: object + properties: + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account in which this payment source is stored. + deprecated: false + iban: + maxLength: 50 + minLength: 10 + type: string + description: | + Account holder's International Bank Account Number. For the [GoCardless](https://www.chargebee.com/docs/gocardless.html) platform, this can be the [local bank details](https://developer.gocardless.com/api-reference/#appendix-local-bank-details) + deprecated: false + first_name: + maxLength: 150 + type: string + description: | + Account holder's first name as per bank account. If not passed, details from customer details will be considered. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + Account holder's last name as per bank account. If not passed, details from customer details will be considered. + deprecated: false + company: + maxLength: 250 + type: string + description: | + Account holder's company name as per bank account. If not passed, details from customer details will be considered. + deprecated: false + email: + maxLength: 70 + type: string + description: | + Account holder's email address. If not passed, details from customer details will be considered. All Direct Debit compliant emails will be sent to this email address. + format: email + deprecated: false + phone: + maxLength: 50 + type: string + description: | + Phone number of the account holder that is linked to the bank account. + deprecated: false + bank_name: + maxLength: 100 + type: string + description: | + Name of account holder's bank. + deprecated: false + account_number: + maxLength: 17 + minLength: 4 + type: string + description: | + Account holder's bank account number. + deprecated: false + routing_number: + maxLength: 9 + minLength: 3 + type: string + description: | + Bank account routing number. + deprecated: false + bank_code: + maxLength: 20 + type: string + description: | + Indicates the bank code. + deprecated: false + account_type: + type: string + description: | + Represents the account type used to create a payment source. Available for [Authorize.net](https://www.authorize.net/) ACH and Razorpay NetBanking users only. If not passed, account type is taken as null. \* checking - Checking Account \* business_checking - Business Checking Account \* savings - Savings Account \* current - Current Account + deprecated: false + enum: + - checking + - savings + - business_checking + - current + account_holder_type: + type: string + description: | + For Stripe ACH users only. Indicates the account holder type. \* individual - Individual Account. \* company - Company Account. + deprecated: false + enum: + - individual + - company + echeck_type: + type: string + description: | + For Authorize.net ACH users only. Indicates the type of eCheck. \* ppd - Payment Authorization is prearranged between the customer and the merchant. \* ccd - Payment Authorization agreement from the corporate customer is required. Applicable for business_checking account_type. \* web - Payment Authorization obtained from the customer via the internet. + deprecated: false + enum: + - web + - ppd + - ccd + issuing_country: + maxLength: 50 + type: string + description: | + [two-letter(alpha2)](https://www.iso.org/iso-3166-country-codes.html) ISO country code. Required when local bank details are provided, and not IBAN. + deprecated: false + swedish_identity_number: + maxLength: 12 + minLength: 10 + type: string + description: | + For GoCardless Autogiro users only. The civic/company number (personnummer, samordningsnummer, or organisationsnummer) of the customer. Must be supplied if the customer's bank account is denominated in Swedish krona (SEK). This field cannot be changed once it has been set. + deprecated: false + billing_address: + type: object + additionalProperties: true + description: | + The billing address associated with the bank account. The value is a JSON object with the following keys and their values: \* \`first_name\`:(string, max chars=150) The first name of the contact. \* \`last_name\`:(string, max chars=150) The last name of the contact. \* \`company_name\`:(string, max chars=250) The company name for the address. \* \`line1\`:(string, max chars=180) The first line of the address. \* \`line2\`:(string, max chars=180) The second line of the address. \* \`country\`:(string) The name of the country for the address. \* \`country_code\`:(string, max chars=50) The two-letter, \[ISO 3166 alpha-2\](https://www.iso.org/iso-3166-country-codes.html) country code for the address. \* \`state\`:(string, max chars=50) The name of the state or province for the address. When not provided, this is set automatically for US, Canada, and India. \* \`state_code\`:(string, max chars=50) The \[ISO 3166-2 state/province code\](https://www.iso.org/obp/ui/#search/code/) without the country prefix. This is supported for USA, Canada, and India. For instance, for Arizona (USA), set state_code as \`AZ\` (not \`US-AZ\`). For Tamil Nadu (India), set as \`TN\` (not \`IN-TN\`). For British Columbia (Canada), set as \`BC\` (not \`CA-BC)\`. \* \`city\`:(string, max chars=50) The city name for the address. \* \`postal_code\`:(string, max chars=20) The postal or ZIP code for the address. \* \`phone\`:(string, max chars=50) The contact phone number for the address. \* \`email\`:(string, max chars=70) The contact email address for the address. + deprecated: false + description: | + Parameters for bank_account + deprecated: false + payment_method: + type: object + properties: + type: + type: string + description: | + The type of payment method. For more details refer [Update payment method for a customer](customers#update_payment_method_for_a_customer) API under Customer resource. \* google_pay - Payments made via Google Pay. \* sofort - Payments made via Sofort. \* netbanking_emandates - Netbanking (eMandates) Payments. \* apple_pay - Payments made via Apple Pay. \* unionpay - Payments made via UnionPay. \* giropay - Payments made via giropay. \* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created. \* bancontact - Payments made via Bancontact Card. \* upi - UPI Payments. \* alipay - Payments made via Alipay. \* pay_to - Payments made via PayTo \* wechat_pay - Payments made via WeChat Pay. \* sepa_instant_transfer - Payments made via Sepa Instant Transfer \* dotpay - Payments made via Dotpay. \* paypal_express_checkout - Payments made via PayPal Express Checkout. \* ideal - Payments made via iDEAL. \* generic - Payments made via Generic Payment Method. \* klarna_pay_now - Payments made via Klarna Pay Now \* faster_payments - Payments made via Faster Payments \* venmo - Payments made via Venmo \* automated_bank_transfer - Represents virtual bank account using which the payment will be done. \* amazon_payments - Payments made via Amazon Payments. \* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource. + deprecated: false + enum: + - card + - paypal_express_checkout + - amazon_payments + - direct_debit + - generic + - alipay + - unionpay + - apple_pay + - wechat_pay + - ideal + - google_pay + - sofort + - bancontact + - giropay + - dotpay + - upi + - netbanking_emandates + - venmo + - pay_to + - faster_payments + - sepa_instant_transfer + - automated_bank_transfer + - klarna_pay_now + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account in which this payment source is stored. + deprecated: false + reference_id: + maxLength: 200 + type: string + description: "The reference id. In the case of Amazon and PayPal\ + \ this will be the *billing agreement id* . For GoCardless\ + \ direct debit this will be 'mandate id'. In the case of card\ + \ this will be the identifier provided by the gateway/card\ + \ vault for the specific payment method resource. **Note:**\ + \ This is not the one-time temporary token provided by gateways\ + \ like Stripe. \nFor more details refer [Update payment\ + \ method for a customer](customers#update_payment_method_for_a_customer)\ + \ API under Customer resource.\n" + deprecated: false + tmp_token: + maxLength: 65000 + type: string + description: | + Single-use tokens created by payment gateways. In Stripe, a single-use token is created for Apple Pay Wallet, card details or direct debit. In Braintree, a nonce is created for Apple Pay Wallet, PayPal, or card details. In Authorize.Net, a nonce is created for card details. In Adyen, an encrypted data is created from the card details. + deprecated: false + issuing_country: + maxLength: 50 + type: string + description: "[ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\nIf you have enabled [EU\ + \ VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021\ + \ or have [manually\nenabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern\nIreland**) is available as an option.\n" + deprecated: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`checkout_com\`: While adding a new payment method using \[permanent token\](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, \`document\` ID and \`country_of_residence\` are required to support payments through \[dLocal\](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). \* \`payer\`: User related information. \* \`country_of_residence\`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a \[two-character ISO code\](https://docs.checkout.com/resources/codes/country-codes). \* \`document\`: Document ID is the user's \[identification number\](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. \* \`bluesnap\`: While passing raw card details to BlueSnap, if \`fraud_session_id\` is added, \[additional validation\](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your \[BlueSnap fraud session ID\](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. \* \`braintree\`: While passing raw card details to Braintree, your \`fraud_merchant_id\` and the user's \`device_session_id\` can be added to perform \[additional validation\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`fraud_merchant_id\`: Your \[merchant ID\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. \* \`chargebee_payments\`: While passing raw card details to Chargebee Payments, if \`fraud_session_id\` is added, additional validation is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. \* \`bank_of_america\`: While passing raw card details to Bank of America, your user's \`device_session_id\` can be added to perform additional validation and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`ecentric\`: This parameter is used to verify and process payment method details in Ecentric. If the \`merchant_id\` parameter is included, Chargebee will vault it / perform a lookup and verification against this \`merchant_id\`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. \* \`merchant_id\`: Merchant GUID where the card is vaulted or need to be vaulted. \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries and \`device_session_id\` can be added to perform \[additional validation\](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device + deprecated: false + description: | + Parameters for payment_method + deprecated: false + payment_intent: + type: object + properties: + id: + maxLength: 150 + type: string + description: | + Identifier for PaymentIntent generated by Chargebee.js. Applicable only when you are using Chargebee.js for completing the 3DS flow. The PaymentIntent should be in 'authorized' state while passing it here. You need not pass other PaymentIntent parameters if this is passed. + deprecated: false + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account used for performing the 3DS flow. + deprecated: false + gw_token: + maxLength: 65000 + type: string + description: | + Identifier for 3DS transaction/verification object at the gateway. Can be passed only after successfully completing the 3DS flow. Refer [3DS implementation in Chargebee](/docs/api/3ds_card_payments#3ds-gateway-side-implementation) to find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow. + deprecated: false + payment_method_type: + type: string + description: | + The list of payment method types (For example, card, ideal, sofort, bancontact, etc.) this Payment Intent is allowed to use. If payment method type is empty, Card is taken as the default type for all gateways except Razorpay. \* card - card \* dotpay - dotpay \* faster_payments - Faster Payments \* upi - upi \* google_pay - google_pay \* paypal_express_checkout - paypal_express_checkout \* klarna_pay_now - Klarna Pay Now \* ideal - ideal \* boleto - boleto \* direct_debit - direct_debit \* sepa_instant_transfer - Sepa Instant Transfer \* bancontact - bancontact \* venmo - Venmo \* pay_to - PayTo \* netbanking_emandates - netbanking_emandates \* apple_pay - apple_pay \* giropay - giropay \* sofort - sofort \* amazon_payments - Amazon Payments + deprecated: false + enum: + - card + - ideal + - sofort + - bancontact + - google_pay + - dotpay + - giropay + - apple_pay + - upi + - netbanking_emandates + - paypal_express_checkout + - direct_debit + - boleto + - venmo + - amazon_payments + - pay_to + - faster_payments + - sepa_instant_transfer + - klarna_pay_now + reference_id: + maxLength: 65000 + type: string + description: | + Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow. + deprecated: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`checkout_com\`: While adding a new payment method using \[permanent token\](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, \`document\` ID and \`country_of_residence\` are required to support payments through \[dLocal\](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). \* \`payer\`: User related information. \* \`country_of_residence\`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a \[two-character ISO code\](https://docs.checkout.com/resources/codes/country-codes). \* \`document\`: Document ID is the user's \[identification number\](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. \* \`bluesnap\`: While passing raw card details to BlueSnap, if \`fraud_session_id\` is added, \[additional validation\](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your \[BlueSnap fraud session ID\](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. \* \`braintree\`: While passing raw card details to Braintree, your \`fraud_merchant_id\` and the user's \`device_session_id\` can be added to perform \[additional validation\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`fraud_merchant_id\`: Your \[merchant ID\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. \* \`chargebee_payments\`: While passing raw card details to Chargebee Payments, if \`fraud_session_id\` is added, additional validation is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. \* \`bank_of_america\`: While passing raw card details to Bank of America, your user's \`device_session_id\` can be added to perform additional validation and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`ecentric\`: This parameter is used to verify and process payment method details in Ecentric. If the \`merchant_id\` parameter is included, Chargebee will vault it / perform a lookup and verification against this \`merchant_id\`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. \* \`merchant_id\`: Merchant GUID where the card is vaulted or need to be vaulted. \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries and \`device_session_id\` can be added to perform \[additional validation\](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device + deprecated: false + description: | + Parameters for payment_intent + deprecated: false + billing_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the billing contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the billing contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements).\ + \ \n**Brexit**\n\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for billing_address + deprecated: false + entity_identifiers: + type: object + properties: + id: + type: array + description: | + The unique id for the `entity_identifier` in Chargebee. When not provided, it is autogenerated. + items: + maxLength: 40 + type: string + deprecated: false + scheme: + type: array + description: "The Peppol BIS scheme associated with the [vat_number](customers#customer_vat_number)\ + \ of the customer. This helps identify the specific type of\ + \ customer entity. For example, `DE:VAT` is used for a German\ + \ business entity while `DE:LWID45` is used for a German government\ + \ entity. The value must be from the list of possible values\ + \ and must correspond to the country provided under `billing_address.country`.\ + \ See [list of possible values](https://www.chargebee.com/docs/e-invoicing.html#supported-countries).\ + \ \n**Tip:**\n\n\nIf there is only one entity identifier\ + \ for the customer and the value is the same as `vat_number`,\ + \ then there is no need to provide the `entity_identifiers[]`\ + \ array. See [description for `entity_identifiers[]`](customers#customer_entity_identifiers).\n" + items: + maxLength: 50 + type: string + deprecated: false + value: + type: array + description: "The value of the `entity_identifier`. This identifies\ + \ the customer entity on the Peppol network. For example:\ + \ `10101010-STO-10`. \n**Tip:**\n\n\nIf there is only one\ + \ entity identifier for the customer and the value is the\ + \ same as `vat_number`, then there is no need to provide the\ + \ `entity_identifiers[]` array. See [description for `entity_identifiers[]`](customers#customer_entity_identifiers).\n" + items: + maxLength: 50 + type: string + deprecated: false + standard: + type: array + description: "The standard used for specifying the `entity_identifier`\ + \ `scheme`. Currently, only `iso6523-actorid-upis` is supported\ + \ and is used by default when not provided. \n**Tip:**\n\n\ + \nIf there is only one entity identifier for the customer\ + \ and the value is the same as `vat_number`, then there is\ + \ no need to provide the `entity_identifiers[]` array. See\ + \ [description for `entity_identifiers[]`](customers#customer_entity_identifiers).\n" + items: + maxLength: 50 + type: string + deprecated: false + default: iso6523-actorid-upis + description: | + Parameters for entity_identifiers + deprecated: false + tax_providers_fields: + type: object + properties: + provider_name: + type: array + items: + maxLength: 50 + type: string + deprecated: false + field_id: + type: array + items: + maxLength: 50 + type: string + deprecated: false + field_value: + type: array + items: + maxLength: 50 + type: string + deprecated: false + description: | + Parameters for tax_providers_fields + deprecated: false + additionalProperties: true + encoding: + bank_account: + style: deepObject + explode: true + billing_address: + style: deepObject + explode: true + card: + style: deepObject + explode: true + entity_identifiers: + style: deepObject + explode: true + payment_intent: + style: deepObject + explode: true + payment_method: + style: deepObject + explode: true + tax_providers_fields: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/add_contact: + post: + summary: Add contacts to a customer + description: | + Adds the required contact to a customer. You can give the First Name, Last Name, Email ID and more details as input parameters to add them under the desired customer. + operationId: add_contacts_to_a_customer + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + contact: + required: + - email + type: object + properties: + id: + maxLength: 150 + type: string + description: | + Unique reference ID provided for the contact. + deprecated: false + first_name: + maxLength: 150 + type: string + description: | + First name of the contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + Last name of the contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + Email of the contact. + format: email + deprecated: false + phone: + maxLength: 50 + type: string + description: | + Phone number of the contact. + deprecated: false + label: + maxLength: 50 + type: string + description: | + Label/Tag provided for contact. + deprecated: false + enabled: + type: boolean + description: | + Contact enabled / disabled + deprecated: false + default: false + send_billing_email: + type: boolean + description: | + Whether Billing Emails option is enabled for the contact. + deprecated: false + default: false + send_account_email: + type: boolean + description: | + Whether Account Emails option is enabled for the contact. + deprecated: false + default: false + description: | + Parameters for contact + deprecated: false + encoding: + contact: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/contacts: + get: + summary: List of contacts for a customer + description: | + This API retrieves all the contacts for a customer. + operationId: list_of_contacts_for_a_customer + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?: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:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - contact + type: object + properties: + contact: + $ref: '#/components/schemas/Contact' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/clear_personal_data: + post: + summary: Clear Personal Data of a customer + description: | + Clear personal details of a customer using this API. + operationId: clear_personal_data_of_a_customer + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A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:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/merge: + post: + summary: Merge customers + description: "This API moves a customer's payment methods, subscriptions, invoices,\ + \ credit notes, transactions, unbilled charges, and orders to another customer.\ + \ Events and email logs will not be moved. The API execution is asynchronous.\ + \ \n**Note**\n\n* Moving virtual bank accounts from one customer to another\ + \ is not supported in this API.\n* Merging customers from different [business\ + \ entities](/docs/api?prod_cat_ver=2#mbe) is not permitted.\n" + operationId: merge_customers + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a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?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - from_customer_id + - to_customer_id + type: object + properties: + from_customer_id: + maxLength: 50 + type: string + description: | + From customer id. + deprecated: false + to_customer_id: + maxLength: 50 + type: string + description: | + To customer id. + deprecated: false + tax_providers_fields: + type: object + properties: + provider_name: + type: array + items: + maxLength: 50 + type: string + deprecated: false + field_id: + type: array + items: + maxLength: 50 + type: string + deprecated: false + field_value: + type: array + items: + maxLength: 50 + type: string + deprecated: false + description: | + Parameters for tax_providers_fields + deprecated: false + encoding: + tax_providers_fields: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/collect_payment: + post: + summary: Collect payment for customer + description: | + **Note:** This operation optionally supports 3DS verification flow. To achieve the same, create the [Payment Intent](/docs/api/#3ds_card_payments) and pass it as input parameter to this API. + + This API can be used to collect the payments for customer's **payment_due** and **not_paid** invoices. You can either choose to collect the payment from an existing payment source or a new payment source. You can choose to either retain or discard the new payment source, which is being used for payment. If the amount collected exceeds the invoice amount, the surplus will be counted in as excess payments. + operationId: collect_payment_for_customer + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?: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?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + amount: + minimum: 0 + type: integer + description: | + Amount to be collected. If this parameter is not passed then the invoice(s) amount to collect will be collected. + format: int64 + deprecated: false + payment_source_id: + maxLength: 40 + type: string + description: | + Payment source used for the payment. + deprecated: false + token_id: + maxLength: 40 + type: string + description: | + Token generated by Chargebee JS representing payment method details. + deprecated: false + replace_primary_payment_source: + type: boolean + description: | + Indicates whether the primary payment source should be replaced with this payment source. In case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False. + deprecated: false + default: false + retain_payment_source: + type: boolean + description: | + Indicates whether the payment source should be retained for the customer. + deprecated: false + default: false + payment_initiator: + type: string + description: | + The type of initiator to be used for the payment request triggered by this operation. \* customer - Pass this value to indicate that the request is initiated by the customer \* merchant - Pass this value to indicate that the request is initiated by the merchant + deprecated: false + enum: + - customer + - merchant + payment_method: + type: object + properties: + type: + type: string + description: | + The type of payment method. For more details refer [Update payment method for a customer](customers#update_payment_method_for_a_customer) API under Customer resource. \* sepa_instant_transfer - Payments made via Sepa Instant Transfer \* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created. \* bancontact - Payments made via Bancontact Card. \* dotpay - Payments made via Dotpay. \* automated_bank_transfer - Represents virtual bank account using which the payment will be done. \* upi - UPI Payments. \* google_pay - Payments made via Google Pay. \* amazon_payments - Payments made via Amazon Payments. \* paypal_express_checkout - Payments made via PayPal Express Checkout. \* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource. \* ideal - Payments made via iDEAL. \* sofort - Payments made via Sofort. \* alipay - Payments made via Alipay. \* generic - Payments made via Generic Payment Method. \* klarna_pay_now - Payments made via Klarna Pay Now \* netbanking_emandates - Netbanking (eMandates) Payments. \* apple_pay - Payments made via Apple Pay. \* pay_to - Payments made via PayTo \* unionpay - Payments made via UnionPay. \* faster_payments - Payments made via Faster Payments \* venmo - Payments made via Venmo \* giropay - Payments made via giropay. \* wechat_pay - Payments made via WeChat Pay. + deprecated: false + enum: + - card + - paypal_express_checkout + - amazon_payments + - direct_debit + - generic + - alipay + - unionpay + - apple_pay + - wechat_pay + - ideal + - google_pay + - sofort + - bancontact + - giropay + - dotpay + - upi + - netbanking_emandates + - venmo + - pay_to + - faster_payments + - sepa_instant_transfer + - automated_bank_transfer + - klarna_pay_now + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account in which this payment source is stored. + deprecated: false + reference_id: + maxLength: 200 + type: string + description: "The reference id. In the case of Amazon and PayPal\ + \ this will be the *billing agreement id* . For GoCardless\ + \ direct debit this will be 'mandate id'. In the case of card\ + \ this will be the identifier provided by the gateway/card\ + \ vault for the specific payment method resource. **Note:**\ + \ This is not the one-time temporary token provided by gateways\ + \ like Stripe. \nFor more details refer [Update payment\ + \ method for a customer](customers#update_payment_method_for_a_customer)\ + \ API under Customer resource.\n" + deprecated: false + tmp_token: + maxLength: 65000 + type: string + description: | + Single-use token created by payment gateways. In Stripe, a single-use token is created for Apple Pay Wallet or card details. In Braintree, a nonce is created for Apple Pay Wallet, PayPal, or card details. In Authorize.Net, a nonce is created for card details. In Adyen, an encrypted data is created from the card details. + deprecated: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`checkout_com\`: While adding a new payment method using \[permanent token\](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, \`document\` ID and \`country_of_residence\` are required to support payments through \[dLocal\](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). \* \`payer\`: User related information. \* \`country_of_residence\`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a \[two-character ISO code\](https://docs.checkout.com/resources/codes/country-codes). \* \`document\`: Document ID is the user's \[identification number\](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. \* \`bluesnap\`: While passing raw card details to BlueSnap, if \`fraud_session_id\` is added, \[additional validation\](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your \[BlueSnap fraud session ID\](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. \* \`braintree\`: While passing raw card details to Braintree, your \`fraud_merchant_id\` and the user's \`device_session_id\` can be added to perform \[additional validation\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`fraud_merchant_id\`: Your \[merchant ID\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. \* \`chargebee_payments\`: While passing raw card details to Chargebee Payments, if \`fraud_session_id\` is added, additional validation is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. \* \`bank_of_america\`: While passing raw card details to Bank of America, your user's \`device_session_id\` can be added to perform additional validation and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`ecentric\`: This parameter is used to verify and process payment method details in Ecentric. If the \`merchant_id\` parameter is included, Chargebee will vault it / perform a lookup and verification against this \`merchant_id\`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. \* \`merchant_id\`: Merchant GUID where the card is vaulted or need to be vaulted. \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries and \`device_session_id\` can be added to perform \[additional validation\](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device + deprecated: false + description: | + Parameters for payment_method + deprecated: false + card: + type: object + properties: + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account in which this payment source is stored. + deprecated: false + first_name: + maxLength: 50 + type: string + description: | + Cardholder's first name + deprecated: false + last_name: + maxLength: 50 + type: string + description: | + Cardholder's last name + deprecated: false + number: + maxLength: 1500 + type: string + description: | + The credit card number without any format. If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js), you can specify the Braintree encrypted card number here. + deprecated: false + expiry_month: + maximum: 12 + minimum: 1 + type: integer + description: | + Card expiry month. + format: int32 + deprecated: false + expiry_year: + type: integer + description: | + Card expiry year. + format: int32 + deprecated: false + cvv: + maxLength: 520 + type: string + description: | + The card verification value (CVV). If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js), you can specify the Braintree encrypted CVV here. + deprecated: false + billing_addr1: + maxLength: 150 + type: string + description: | + Address line 1, as available in card billing address. + deprecated: false + billing_addr2: + maxLength: 150 + type: string + description: | + Address line 2, as available in card billing address. + deprecated: false + billing_city: + maxLength: 50 + type: string + description: | + City, as available in card billing address. + deprecated: false + billing_state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + billing_state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + billing_zip: + maxLength: 20 + type: string + description: | + Postal or Zip code, as available in card billing address. + deprecated: false + billing_country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`checkout_com\`: While adding a new payment method using \[permanent token\](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, \`document\` ID and \`country_of_residence\` are required to support payments through \[dLocal\](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). \* \`payer\`: User related information. \* \`country_of_residence\`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a \[two-character ISO code\](https://docs.checkout.com/resources/codes/country-codes). \* \`document\`: Document ID is the user's \[identification number\](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. \* \`bluesnap\`: While passing raw card details to BlueSnap, if \`fraud_session_id\` is added, \[additional validation\](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your \[BlueSnap fraud session ID\](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. \* \`braintree\`: While passing raw card details to Braintree, your \`fraud_merchant_id\` and the user's \`device_session_id\` can be added to perform \[additional validation\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`fraud_merchant_id\`: Your \[merchant ID\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. \* \`chargebee_payments\`: While passing raw card details to Chargebee Payments, if \`fraud_session_id\` is added, additional validation is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. \* \`bank_of_america\`: While passing raw card details to Bank of America, your user's \`device_session_id\` can be added to perform additional validation and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`ecentric\`: This parameter is used to verify and process payment method details in Ecentric. If the \`merchant_id\` parameter is included, Chargebee will vault it / perform a lookup and verification against this \`merchant_id\`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. \* \`merchant_id\`: Merchant GUID where the card is vaulted or need to be vaulted. \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries and \`device_session_id\` can be added to perform \[additional validation\](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device + deprecated: false + description: | + Parameters for card + deprecated: false + payment_intent: + type: object + properties: + id: + maxLength: 150 + type: string + description: | + Identifier for PaymentIntent generated by Chargebee.js. Applicable only when you are using Chargebee.js for completing the 3DS flow. The PaymentIntent should be in 'authorized' state while passing it here. You need not pass other PaymentIntent parameters if this is passed. + deprecated: false + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account used for performing the 3DS flow. + deprecated: false + gw_token: + maxLength: 65000 + type: string + description: | + Identifier for 3DS transaction/verification object at the gateway. Can be passed only after successfully completing the 3DS flow. Refer [3DS implementation in Chargebee](/docs/api/3ds_card_payments#3ds-gateway-side-implementation) to find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow. + deprecated: false + payment_method_type: + type: string + description: | + The list of payment method types (For example, card, ideal, sofort, bancontact, etc.) this Payment Intent is allowed to use. If payment method type is empty, Card is taken as the default type for all gateways except Razorpay. \* card - card \* netbanking_emandates - netbanking_emandates \* dotpay - dotpay \* faster_payments - Faster Payments \* upi - upi \* direct_debit - direct_debit \* sepa_instant_transfer - Sepa Instant Transfer \* bancontact - bancontact \* google_pay - google_pay \* apple_pay - apple_pay \* giropay - giropay \* paypal_express_checkout - paypal_express_checkout \* venmo - Venmo \* klarna_pay_now - Klarna Pay Now \* sofort - sofort \* amazon_payments - Amazon Payments \* ideal - ideal \* pay_to - PayTo \* boleto - boleto + deprecated: false + enum: + - card + - ideal + - sofort + - bancontact + - google_pay + - dotpay + - giropay + - apple_pay + - upi + - netbanking_emandates + - paypal_express_checkout + - direct_debit + - boleto + - venmo + - amazon_payments + - pay_to + - faster_payments + - sepa_instant_transfer + - klarna_pay_now + reference_id: + maxLength: 65000 + type: string + description: | + Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow. + deprecated: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`checkout_com\`: While adding a new payment method using \[permanent token\](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, \`document\` ID and \`country_of_residence\` are required to support payments through \[dLocal\](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). \* \`payer\`: User related information. \* \`country_of_residence\`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a \[two-character ISO code\](https://docs.checkout.com/resources/codes/country-codes). \* \`document\`: Document ID is the user's \[identification number\](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. \* \`bluesnap\`: While passing raw card details to BlueSnap, if \`fraud_session_id\` is added, \[additional validation\](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your \[BlueSnap fraud session ID\](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. \* \`braintree\`: While passing raw card details to Braintree, your \`fraud_merchant_id\` and the user's \`device_session_id\` can be added to perform \[additional validation\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`fraud_merchant_id\`: Your \[merchant ID\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. \* \`chargebee_payments\`: While passing raw card details to Chargebee Payments, if \`fraud_session_id\` is added, additional validation is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. \* \`bank_of_america\`: While passing raw card details to Bank of America, your user's \`device_session_id\` can be added to perform additional validation and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`ecentric\`: This parameter is used to verify and process payment method details in Ecentric. If the \`merchant_id\` parameter is included, Chargebee will vault it / perform a lookup and verification against this \`merchant_id\`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. \* \`merchant_id\`: Merchant GUID where the card is vaulted or need to be vaulted. \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries and \`device_session_id\` can be added to perform \[additional validation\](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device + deprecated: false + description: | + Parameters for payment_intent + deprecated: false + invoice_allocations: + required: + - invoice_id + type: object + properties: + invoice_id: + type: array + description: | + Identifier for the invoice. Multiple invoices can be passed. + items: + maxLength: 50 + type: string + deprecated: false + allocation_amount: + type: array + description: | + Amount that will override the Invoice amount to be collected. If not specified Invoice amount to collect will be taken as default. The unit depends on the [type of currency](/docs/api#md_disabled). + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + description: | + Parameters for invoice_allocations + deprecated: false + encoding: + card: + style: deepObject + explode: true + invoice_allocations: + style: deepObject + explode: true + payment_intent: + style: deepObject + explode: true + payment_method: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - transaction + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + transaction: + $ref: '#/components/schemas/Transaction' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/record_excess_payment: + post: + summary: Record an excess payment for a customer + description: | + Use this API to record any [excess payments](//www.chargebee.com/docs/customers.html#excess-payments) made by the customer, such as advance payments. Such payments will be automatically applied to the future invoices. It can also be [manually applied](//www.chargebee.com/docs/invoice-operations.html#apply-excess-payments) to the existing *Not Paid* or *Payment Due* invoices. + operationId: record_an_excess_payment_for_a_customer + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{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:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + comment: + maxLength: 300 + type: string + description: | + Remarks, if any, on the payment. + deprecated: false + transaction: + required: + - amount + - date + - payment_method + type: object + properties: + amount: + minimum: 1 + type: integer + description: | + The payment transaction amount + format: int64 + deprecated: false + currency_code: + maxLength: 3 + type: string + description: | + The currency code (ISO 4217 format) for the transaction. + deprecated: false + date: + pattern: "^[0-9]{10}$" + type: integer + description: | + Indicates when this transaction occurred. + format: unix-time + deprecated: false + payment_method: + type: string + description: | + The payment method of this transaction \* cash - Cash \* paypal_express_checkout - Paypal Express Checkout \* automated_bank_transfer - Automated Bank Transfer \* venmo - Venmo \* bancontact - Bancontact \* custom - Custom \* ideal - IDEAL \* check - Check \* upi - upi \* sepa_instant_transfer - Sepa Instant Transfer \* alipay - Alipay \* sepa_credit - SEPA Credit \* ach_credit - ACH Credit \* faster_payments - Faster Payments \* sofort - Sofort \* direct_debit - Direct Debit \* bank_transfer - Bank Transfer \* chargeback - Only applicable for a transaction of [type](transactions#transaction_type) = `refund`. This value is set by Chargebee when an automated [chargeback](https://www.chargebee.com/docs/chargeback.html#chargeback-process) occurs. You can also set this explicitly when [recording a refund](transactions#record_an_offline_refund). \* unionpay - Unionpay \* apple_pay - Apple Pay \* dotpay - Dotpay \* netbanking_emandates - netbanking_emandates \* amazon_payments - Amazon Payments \* wechat_pay - WeChat Pay \* google_pay - Google Pay \* card - Card \* klarna_pay_now - Klarna Pay Now \* other - Payment Methods other than the above types \* boleto - boleto \* giropay - giropay \* pay_to - PayTo + deprecated: false + enum: + - cash + - check + - bank_transfer + - other + - custom + reference_number: + maxLength: 100 + type: string + description: | + The reference number for this transaction. e.g check number in case of 'check' payments. + deprecated: false + custom_payment_method_id: + maxLength: 50 + type: string + description: | + Identifier of the custom payment method of this transaction. + deprecated: false + description: | + Parameters for transaction + deprecated: false + encoding: + transaction: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - transaction + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + transaction: + $ref: '#/components/schemas/Transaction' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/update_contact: + post: + summary: Update contacts for a customer + description: | + Updates the details of a contact for a customer. You can give the field data to be updated as input parameters along with the Contact ID to update it. + operationId: update_contacts_for_a_customer + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$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?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + contact: + required: + - id + type: object + properties: + id: + maxLength: 150 + type: string + description: | + Unique reference ID provided for the contact. + deprecated: false + first_name: + maxLength: 150 + type: string + description: | + First name of the contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + Last name of the contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + Email of the contact. + format: email + deprecated: false + phone: + maxLength: 50 + type: string + description: | + Phone number of the contact. + deprecated: false + label: + maxLength: 50 + type: string + description: | + Label/Tag provided for contact. + deprecated: false + enabled: + type: boolean + description: | + Contact enabled / disabled + deprecated: false + default: false + send_billing_email: + type: boolean + description: | + Whether Billing Emails option is enabled for the contact. + deprecated: false + default: false + send_account_email: + type: boolean + description: | + Whether Account Emails option is enabled for the contact. + deprecated: false + default: false + description: | + Parameters for contact + deprecated: false + encoding: + contact: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/update_hierarchy_settings: + post: + summary: Update account hierarchy access settings for a customer + description: "When the customer is part of an [account hierarchy](https://www.chargebee.com/docs/account-hierarchy.html),\ + \ this operation updates the access privileges that both the customer and\ + \ its parent have to the customer's data. \n**Terminology**\n\nThe term \"\ + parent\" usually refers to the customer with the ID [payment_owner_id](customers#customer_relationship_payment_owner_id).\ + \ However, if the `payment_owner_id` is the same as the child's ID (given\ + \ by the path parameter), the \"parent\" is identified by [parent_id](customers#customer_relationship_parent_id).\ + \ \n**Tip**\n\nYou cannot use this endpoint to change the `parent_id`, `invoice_owner_id`\ + \ or `payment_owner_id` for the customer. To change them, [unlink the customer](customers#delink_a_customer)\ + \ and then call [Link a customer](customers?prod_cat_ver=2#link_a_customer)\ + \ with the updated values.\n" + operationId: update_hierarchy_access_settings_for_a_customer + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + use_default_hierarchy_settings: + type: boolean + description: | + Decides if Chargebee should apply settings from the [Chargebee Billing UI](https://www.chargebee.com/docs/2.0/account-hierarchy.html#advanced-mode) or from this API request. + + * If set to `true`: Chargebee removes existing settings stored in the `parent_account_access` and `child_account_access` attributes of the customer. The settings configured in the Chargebee Billing UI apply for the customer. + * If set to `false`: Chargebee replaces existing settings stored in the `parent_account_access` and `child_account_access` parameters with those passed in this API call. If any of those parameters are not passed, they remain unchanged for the customer. + deprecated: false + default: true + parent_account_access: + type: object + properties: + portal_edit_child_subscriptions: + type: string + description: | + Sets parent's level of access to child subscriptions on the Self-Serve Portal. \* yes - The parent account can view and edit the subscriptions of the child account. \* no - The parent account cannot view or edit the subscriptions of the child account. \* view_only - The parent account can only view the subscriptions of the child account. + deprecated: false + enum: + - "yes" + - view_only + - "no" + portal_download_child_invoices: + type: string + description: | + Sets parent's level of access to child invoices on the Self-Serve Portal. \* yes - The parent account can view and download the invoices of the child account. \* no - The parent account can neither view nor download the invoices of the child account. \* view_only - The parent account can only view the invoices of the child account. + deprecated: false + enum: + - "yes" + - view_only + - "no" + send_subscription_emails: + type: boolean + description: | + If `true`, the parent account will receive subscription-related emails sent to the child account. + deprecated: false + send_payment_emails: + type: boolean + description: | + If `true`, the parent account will receive payment-related emails sent to the child account. + deprecated: false + send_invoice_emails: + type: boolean + description: | + If `true`, the parent account will receive invoice-related emails sent to the child account. + deprecated: false + description: | + Parameters for parent_account_access + deprecated: false + child_account_access: + type: object + properties: + portal_edit_subscriptions: + type: string + description: | + Determines the child's access to its own subscriptions in the Self-Serve Portal. \* view_only - The child account can only view its subscriptions. \* yes - The child account can view and edit its subscriptions. + deprecated: false + enum: + - "yes" + - view_only + portal_download_invoices: + type: string + description: | + Determines the child's access to its own invoices in the Self-Serve Portal. \* view_only - The child account can view but not download its invoices. \* no - The child account cannot view or download its own invoices. \* yes - The child account can both view and download its invoices. + deprecated: false + enum: + - "yes" + - view_only + - "no" + send_subscription_emails: + type: boolean + description: | + If `true`, the child account receives email notifications for its subscriptions. + deprecated: false + send_payment_emails: + type: boolean + description: | + If `true`, the child account receives email notifications for payment-related activities for its invoices. + deprecated: false + send_invoice_emails: + type: boolean + description: | + If `true`, the child account receives email notifications for its invoices. + deprecated: false + description: | + When the customer is part of an \[account hierarchy\](https://www.chargebee.com/docs/account-hierarchy.html), this attribute defines the level of access that the customer has to its own information. + deprecated: false + encoding: + child_account_access: + style: deepObject + explode: true + parent_account_access: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/update_billing_info: + post: + summary: Update billing info for a customer + description: | + This method is used for updating the `billing_address` and `vat_number` attributes of the `customer`. For updating the other customer attributes use [Update Customer API](customers#update_a_customer). + + During this operation, if `billing_address` and `vat_number` are not already present, they're added. Whereas if present, the existing values are replaced with the new values passed. The only exception here is for `entity_identifiers[i]` when `entity_identifiers[operation][i]` is passed as `delete`. + + **Note:**When an invoice is generated for a customer, the billing address provided for the customer will be stored with the invoice. If the First Name, Last Name, and Company fields do not contain any information under Billing Info, the same will be picked from Customer Details if the same is available there.Please ensure that the VAT number is provided whenever the billing address is updated, as failing to do so will override any existing VAT numbers if new values are not provided. + operationId: update_billing_info_for_a_customer + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[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0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + vat_number: + maxLength: 20 + type: string + description: | + The VAT/tax registration number for the customer. For customers with [billing_address](customers#customer_billing_address) `country` as `XI` (which is **United Kingdom - Northern Ireland** ), the first two characters of the [full VAT + number](https://en.wikipedia.org/wiki/VAT_identification_number) can be overridden by setting [vat_number_prefix](customers#customer_vat_number_prefix). + deprecated: false + vat_number_prefix: + maxLength: 10 + type: string + description: "An overridden value for the first two characters of\ + \ the [full VAT\nnumber](https://en.wikipedia.org/wiki/VAT_identification_number).\ + \ Only applicable specifically for customers with [billing_address](customers#customer_billing_address)\ + \ `country` as `XI` (which is **United Kingdom - Northern Ireland**\ + \ ). \n\nWhen you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or have [manually\nenabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, you have the option of setting [billing_address](customers#customer_billing_address)\ + \ `country` as `XI`. That's the code for **United Kingdom - Northern\n\ + Ireland** . The first two characters of the VAT number in such\ + \ a case is `XI` by default. However, if the VAT number was registered\ + \ in UK, the value should be `GB`. Set `vat_number_prefix` to\ + \ `GB` for such cases.\n" + deprecated: false + entity_identifier_scheme: + maxLength: 50 + type: string + description: "The Peppol BIS scheme associated with the [vat_number](customers#customer_vat_number)\ + \ of the customer. This helps identify the specific type of customer\ + \ entity. For example, `DE:VAT` is used for a German business\ + \ entity while `DE:LWID45` is used for a German government entity.\ + \ The value must be from the list of possible values and must\ + \ correspond to the country provided under `billing_address.country`.\ + \ See [list of possible values](https://www.chargebee.com/docs/e-invoicing.html#supported-countries).\ + \ \n**Tip:**\n\n\nIf there are additional entity identifiers\ + \ for the customer not associated with the `vat_number`, they\ + \ can be provided as the `entity_identifiers[]` array.\n.\n" + deprecated: false + entity_identifier_standard: + maxLength: 50 + type: string + description: "The standard used for specifying the `entity_identifier_scheme`.\ + \ Currently only `iso6523-actorid-upis` is supported and is used\ + \ by default when not provided. \n**Tip:**\n\n\nIf there are\ + \ additional entity identifiers for the customer not associated\ + \ with the `vat_number`, they can be provided as the `entity_identifiers[]`\ + \ array.\n.\n" + deprecated: false + default: iso6523-actorid-upis + registered_for_gst: + type: boolean + description: | + Confirms that a customer is registered under GST. If set to `true` then the [Reverse Charge Mechanism](https://www.chargebee.com/docs/australian-gst.html#reverse-charge-mechanism) is applicable. This field is applicable only when Australian GST is configured for your site. + deprecated: false + business_customer_without_vat_number: + type: boolean + description: | + Confirms that a customer is a valid business without an EU/UK VAT number. + deprecated: false + is_einvoice_enabled: + type: boolean + description: "Determines whether the customer is e-invoiced. When\ + \ set to `true` or not set to any value, the customer is e-invoiced\ + \ so long as e-invoicing is enabled for their country (`billing_address.country`).\ + \ When set to `false`, the customer is not e-invoiced even if\ + \ e-invoicing is enabled for their country. \n**Tip:**\n\n\n\ + It is possible to set a value for this flag even when E-Invoicing\ + \ is disabled. However, it comes into effect only when E-Invoicing\ + \ is enabled.\n.\n" + deprecated: false + einvoicing_method: + type: string + description: | + Determines whether to send einvoice manually or automatic. \* automatic - Use this value to send e-invoice every time an invoice or credit note is created. \* manual - When manual is selected the automatic e-invoice sending is disabled. Use this value to send e-invoice manually through UI or API. \* site_default - The default value of the site which can be overridden at the customer level. + deprecated: false + enum: + - automatic + - manual + - site_default + billing_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the billing contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the billing contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements).\ + \ \n**Brexit**\n\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\ + \ \n**E-Invoicing**\n\n\nIf `country` is provided as different\ + \ from the existing value and if `entity_identifier_scheme`,\ + \ `entity_identifier_standard`, and `entity_identifier` already\ + \ exist and are not provided for this operation, they're cleared.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* invalid - Address is invalid. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* not_validated - Address is not yet validated. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for billing_address + deprecated: false + entity_identifiers: + type: object + properties: + id: + type: array + description: | + The unique id for the `entity_identifier[i]` in Chargebee. This is required when `entity_identifier[operation][i]` is `update` or `delete`. + items: + maxLength: 40 + type: string + deprecated: false + scheme: + type: array + description: "The Peppol BIS scheme associated with the [vat_number](customers#customer_vat_number)\ + \ of the customer. This helps identify the specific type of\ + \ customer entity. For example, `DE:VAT` is used for a German\ + \ business entity while `DE:LWID45` is used for a German government\ + \ entity. The value must be from the list of possible values\ + \ and must correspond to the country provided under `billing_address.country`.\ + \ See [list of possible values](https://www.chargebee.com/docs/e-invoicing.html#supported-countries).\ + \ \n**Tip:**\n\n\nIf there is only one entity identifier\ + \ for the customer and the value is the same as `vat_number`,\ + \ then there is no need to provide the `entity_identifiers[]`\ + \ array. See [description for `entity_identifiers[]`](customers#customer_entity_identifiers).\n" + items: + maxLength: 50 + type: string + deprecated: false + value: + type: array + description: "The value of the `entity_identifier`. This identifies\ + \ the customer entity on the Peppol network. For example:\ + \ `10101010-STO-10`. \n**Tip:**\n\n\nIf there is only one\ + \ entity identifier for the customer and the value is the\ + \ same as `vat_number`, then there is no need to provide the\ + \ `entity_identifiers[]` array. See [description for `entity_identifiers[]`](customers#customer_entity_identifiers).\n" + items: + maxLength: 50 + type: string + deprecated: false + operation: + type: array + items: + type: string + description: | + The operation to be performed for the `entity_identifier`. \* update - Updates an existing `entity_identifier` for the customer. `entity_identifier[id]` must be provided in this case. \* delete - Deletes an existing `entity_identifier` for the customer. `entity_identifier[id]` must be provided in this case. \* create - Creates a new `entity_identifier` for the customer. + deprecated: false + enum: + - create + - update + - delete + standard: + type: array + description: "The standard used for specifying the `entity_identifier`\ + \ `scheme`. Currently, only `iso6523-actorid-upis` is supported\ + \ and is used by default when not provided. \n**Tip:**\n\n\ + \nIf there is only one entity identifier for the customer\ + \ and the value is the same as `vat_number`, then there is\ + \ no need to provide the `entity_identifiers[]` array. See\ + \ [description for `entity_identifiers[]`](customers#customer_entity_identifiers).\n" + items: + maxLength: 50 + type: string + deprecated: false + default: iso6523-actorid-upis + description: | + Parameters for entity_identifiers + deprecated: false + tax_providers_fields: + type: object + properties: + provider_name: + type: array + items: + maxLength: 50 + type: string + deprecated: false + field_id: + type: array + items: + maxLength: 50 + type: string + deprecated: false + field_value: + type: array + items: + maxLength: 50 + type: string + deprecated: false + description: | + Parameters for tax_providers_fields + deprecated: false + encoding: + billing_address: + style: deepObject + explode: true + entity_identifiers: + style: deepObject + explode: true + tax_providers_fields: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /tokens/create_using_temp_token: + post: + summary: Create using vault temp token + description: | + Generate a token using the one time token created by payment gateways for any specific payment method. + operationId: create_using_vault_temp_token + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(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0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - id_at_vault + - payment_method_type + type: object + properties: + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account to which the token is associated. + deprecated: false + payment_method_type: + type: string + description: | + Type of payment method of the token. \* google_pay - Payments made via Google Pay. \* apple_pay - Payments made via Apple Pay. \* unionpay - Payments made via UnionPay. \* ideal - Payments made via iDEAL. \* amazon_payments - Payments made via Amazon Payments. \* bancontact - Payments made via Bancontact Card. \* netbanking_emandates - Netbanking (eMandates) Payments. \* alipay - Payments made via Alipay. \* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource. \* dotpay - Payments made via Dotpay. \* giropay - Payments made via giropay. \* upi - UPI Payments. \* sofort - Payments made via Sofort. \* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created. \* generic - Payments made via Generic Payment Method. \* wechat_pay - Payments made via WeChat Pay. \* paypal_express_checkout - Payments made via PayPal Express Checkout. + deprecated: false + enum: + - card + - paypal_express_checkout + - amazon_payments + - direct_debit + - generic + - alipay + - unionpay + - apple_pay + - wechat_pay + - ideal + - google_pay + - sofort + - bancontact + - giropay + - dotpay + - upi + - netbanking_emandates + - venmo + - pay_to + - faster_payments + - sepa_instant_transfer + - automated_bank_transfer + - klarna_pay_now + id_at_vault: + maxLength: 65000 + type: string + description: | + Single-use token created by payment gateways. In Stripe, a single-use token is created for Apple Pay Wallet, card details or direct debit. In Braintree, a nonce is created for Apple Pay Wallet, PayPal, or card details. In Authorize.net, a nonce is created for card details. In Adyen, an encrypted data is created from the card details. + deprecated: false + gw_obj_type: + maxLength: 255 + type: string + description: | + Represents what type of object at gateway eg. "token" in case Stripe token and "source" in case of Stripe Source. + deprecated: false + currency_code: + maxLength: 3 + type: string + description: | + Used to derieve Bank Account Scheme by default will take site default currency. + deprecated: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`checkout_com\`: While adding a new payment method using \[permanent token\](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, \`document\` ID and \`country_of_residence\` are required to support payments through \[dLocal\](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). \* \`payer\`: User related information. \* \`country_of_residence\`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a \[two-character ISO code\](https://docs.checkout.com/resources/codes/country-codes). \* \`document\`: Document ID is the user's \[identification number\](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. \* \`bluesnap\`: While passing raw card details to BlueSnap, if \`fraud_session_id\` is added, \[additional validation\](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your \[BlueSnap fraud session ID\](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. \* \`braintree\`: While passing raw card details to Braintree, your \`fraud_merchant_id\` and the user's \`device_session_id\` can be added to perform \[additional validation\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`fraud_merchant_id\`: Your \[merchant ID\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. \* \`chargebee_payments\`: While passing raw card details to Chargebee Payments, if \`fraud_session_id\` is added, additional validation is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. \* \`bank_of_america\`: While passing raw card details to Bank of America, your user's \`device_session_id\` can be added to perform additional validation and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`ecentric\`: This parameter is used to verify and process payment method details in Ecentric. If the \`merchant_id\` parameter is included, Chargebee will vault it / perform a lookup and verification against this \`merchant_id\`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. \* \`merchant_id\`: Merchant GUID where the card is vaulted or need to be vaulted. \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries and \`device_session_id\` can be added to perform \[additional validation\](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device . + deprecated: false + token_additional_detail: + type: object + properties: + first_name: + maxLength: 50 + type: string + description: | + Cardholder's first name + deprecated: false + last_name: + maxLength: 50 + type: string + description: | + Cardholder's last name + deprecated: false + expiry_month: + maximum: 12 + minimum: 1 + type: integer + description: | + Card expiry month. + format: int32 + deprecated: false + expiry_year: + type: integer + description: | + Card expiry year. + format: int32 + deprecated: false + description: | + Parameters for token_additional_detail + deprecated: false + token_billing_address: + type: object + properties: + line1: + maxLength: 150 + type: string + description: | + Address line 1, as available in card billing address. + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2, as available in card billing address. + deprecated: false + city: + maxLength: 50 + type: string + description: | + City, as available in card billing address. + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + country_code: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Postal or Zip code, as available in card billing address. + deprecated: false + description: | + Parameters for token_billing_address + deprecated: false + encoding: + token_additional_detail: + style: deepObject + explode: true + token_billing_address: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - token + type: object + properties: + token: + $ref: '#/components/schemas/Token' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /tokens/create_for_card: + post: + summary: Create a card payment method token + description: | + Generate a token that holds card related information. + operationId: create_a_card_payment_method_token + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA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fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + card: + required: + - expiry_month + - expiry_year + - number + type: object + properties: + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account in which this payment source is stored. + deprecated: false + first_name: + maxLength: 50 + type: string + description: | + Cardholder's first name + deprecated: false + last_name: + maxLength: 50 + type: string + description: | + Cardholder's last name + deprecated: false + number: + maxLength: 1500 + type: string + description: | + The credit card number without any format. If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js), you can specify the Braintree encrypted card number here. + deprecated: false + expiry_month: + maximum: 12 + minimum: 1 + type: integer + description: | + Card expiry month. + format: int32 + deprecated: false + expiry_year: + type: integer + description: | + Card expiry year. + format: int32 + deprecated: false + cvv: + maxLength: 520 + type: string + description: | + The card verification value (CVV). If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js), you can specify the Braintree encrypted CVV here. + deprecated: false + billing_addr1: + maxLength: 150 + type: string + description: | + Address line 1, as available in card billing address. + deprecated: false + billing_addr2: + maxLength: 150 + type: string + description: | + Address line 2, as available in card billing address. + deprecated: false + billing_city: + maxLength: 50 + type: string + description: | + City, as available in card billing address. + deprecated: false + billing_state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + billing_state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + billing_zip: + maxLength: 20 + type: string + description: | + Postal or Zip code, as available in card billing address. + deprecated: false + billing_country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`checkout_com\`: While adding a new payment method using \[permanent token\](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, \`document\` ID and \`country_of_residence\` are required to support payments through \[dLocal\](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). \* \`payer\`: User related information. \* \`country_of_residence\`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a \[two-character ISO code\](https://docs.checkout.com/resources/codes/country-codes). \* \`document\`: Document ID is the user's \[identification number\](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. \* \`bluesnap\`: While passing raw card details to BlueSnap, if \`fraud_session_id\` is added, \[additional validation\](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your \[BlueSnap fraud session ID\](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. \* \`braintree\`: While passing raw card details to Braintree, your \`fraud_merchant_id\` and the user's \`device_session_id\` can be added to perform \[additional validation\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`fraud_merchant_id\`: Your \[merchant ID\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. \* \`chargebee_payments\`: While passing raw card details to Chargebee Payments, if \`fraud_session_id\` is added, additional validation is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. \* \`bank_of_america\`: While passing raw card details to Bank of America, your user's \`device_session_id\` can be added to perform additional validation and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`ecentric\`: This parameter is used to verify and process payment method details in Ecentric. If the \`merchant_id\` parameter is included, Chargebee will vault it / perform a lookup and verification against this \`merchant_id\`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. \* \`merchant_id\`: Merchant GUID where the card is vaulted or need to be vaulted. \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries and \`device_session_id\` can be added to perform \[additional validation\](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device + deprecated: false + card_type: + type: string + description: | + Type of the card \* not_applicable - Used for offline entries in transactions. Not applicable for cards \* visa - A Visa card. \* jcb - A JCB card. \* diners_club - A Diner's Club card. \* other - Card belonging to types other than those listed above. \* discover - A Discover card. \* american_express - An American Express card. \* bancontact - A Bancontact card. \* mastercard - A MasterCard. + deprecated: false + enum: + - visa + - mastercard + - american_express + - discover + - jcb + - diners_club + - bancontact + - cmr_falabella + - tarjeta_naranja + - nativa + - cencosud + - cabal + - argencard + - elo + - hipercard + - carnet + - rupay + - maestro + - other + - not_applicable + description: | + Parameters for card + deprecated: false + encoding: + card: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - token + type: object + properties: + token: + $ref: '#/components/schemas/Token' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /tokens/{cb-token-id}: + get: + summary: Retrieve a token + description: | + Retrieve a token using token ID. + operationId: retrieve_a_token + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: cb-token-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - token + type: object + properties: + token: + $ref: '#/components/schemas/Token' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /payment_sources/create_using_permanent_token: + post: + summary: Create using permanent token + description: "This API provides an alternative way to create a payment source\ + \ using a permanent token, instead of having to add the full payment method\ + \ details via API or the Chargebee UI. Permanent tokens are provided by payment\ + \ gateways such as Stripe. \nStoring card after successful 3DS completion\ + \ is not supported in this API. Use [create using Payment Intent API](/docs/api/payment_sources#create_using_payment_intent)\ + \ under Payment source to store the card after successful 3DS flow completion.\n" + operationId: create_using_permanent_token + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{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:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - customer_id + - type + type: object + properties: + customer_id: + maxLength: 50 + type: string + description: | + Identifier of the customer with whom this payment source is associated. + deprecated: false + type: + type: string + description: | + The type of payment method. For more details refer [Update payment method for a customer](customers#update_payment_method_for_a_customer) API under Customer resource. \* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created. \* unionpay - Payments made via UnionPay. \* faster_payments - Payments made via Faster Payments \* google_pay - Payments made via Google Pay. \* sepa_instant_transfer - Payments made via Sepa Instant Transfer \* dotpay - Payments made via Dotpay. \* pay_to - Payments made via PayTo \* generic - Payments made via Generic Payment Method. \* giropay - Payments made via giropay. \* klarna_pay_now - Payments made via Klarna Pay Now \* automated_bank_transfer - Represents virtual bank account using which the payment will be done. \* paypal_express_checkout - Payments made via PayPal Express Checkout. \* alipay - Payments made via Alipay. \* venmo - Payments made via Venmo \* sofort - Payments made via Sofort. \* wechat_pay - Payments made via WeChat Pay. \* ideal - Payments made via iDEAL. \* netbanking_emandates - Netbanking (eMandates) Payments. \* upi - UPI Payments. \* bancontact - Payments made via Bancontact Card. \* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource. \* amazon_payments - Payments made via Amazon Payments. \* apple_pay - Payments made via Apple Pay. + deprecated: false + enum: + - card + - paypal_express_checkout + - amazon_payments + - direct_debit + - generic + - alipay + - unionpay + - apple_pay + - wechat_pay + - ideal + - google_pay + - sofort + - bancontact + - giropay + - dotpay + - upi + - netbanking_emandates + - venmo + - pay_to + - faster_payments + - sepa_instant_transfer + - automated_bank_transfer + - klarna_pay_now + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account to which the payment source is associated. + deprecated: false + reference_id: + maxLength: 200 + type: string + description: "The reference id. In the case of Amazon and PayPal,\ + \ this will be the billing agreement ID. For GoCardless direct\ + \ debit this will be `mandate_id`. In the case of a card, this\ + \ will be the identifier provided by the gateway or card vault\ + \ for the specific payment method resource. \n**Note:**\n\n*\ + \ This is not the one-time temporary token provided by gateways\ + \ like Stripe.\n\n* `reference_id` is an alternative for `payment_method_token`,\ + \ `customer_profile_token`, `network_transaction_id`, or `mandate_id`.\n\ + \n* `payment_method_token`, `customer_profile_token`, `network_transaction_id`,\ + \ or `mandate_id` cannot be used with `reference_id`.\n\n* `reference_id`\ + \ is a combination of multiple tokens available at the gateway.\ + \ Learn more about the combination of each gateway from this [document](https://apidocs.chargebee.com/docs/api/payment_parameters).\n\ + \n" + deprecated: false + issuing_country: + maxLength: 50 + type: string + description: | + 2-letter (alpha2) ISO country code. Indicates your customer's payment method country of issuance. Applicable for PayPal via Braintree. + deprecated: false + replace_primary_payment_source: + type: boolean + description: | + Indicates whether the primary payment source should be replaced with this payment source. In case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False. + deprecated: false + default: false + payment_method_token: + maxLength: 100 + type: string + description: "An identifier provided by the gateway or card vault\ + \ for the specific payment method resource. \n**Note:**\n\n`payment_method_token`\ + \ is an alternative for reference_id and cannot be used with `reference_id`.\n" + deprecated: false + customer_profile_token: + maxLength: 100 + type: string + description: "A unique identifier associated with a customer\\`s\ + \ profile within a payment gateway. \n**Note:**\n\n`customer_profile_token`\ + \ is an alternative for reference_id and cannot be used with `reference_id`.\n" + deprecated: false + network_transaction_id: + maxLength: 100 + type: string + description: "An identifier of the payment or authorization transaction\ + \ at the gateway initiated using this payment method. \n**Note:**\n\ + \n`network_transaction_id` is an alternative for reference_id\ + \ and cannot be used with `reference_id`.\n" + deprecated: false + mandate_id: + maxLength: 100 + type: string + description: "An identifier of mandates which is an authorization\ + \ given by the payer (usually a customer or account holder) to\ + \ allow a third party such as a merchant or service provider to\ + \ initiate payments from their account. \n**Note:**\n\n`mandate_id`\ + \ is an alternative for reference_id and cannot be used with `reference_id`.\n" + deprecated: false + skip_retrieval: + type: boolean + description: "By default, the value is `false` and payment method\ + \ details will be retrieved from the selected payment gateway\ + \ using `reference_id` or `payment_method_token` / `customer_profile_token`\ + \ / `network_transaction_id` / `mandate_id`. Learn more about\ + \ the multiple token combinations of each gateway from this [document](https://apidocs.chargebee.com/docs/api/payment_parameters).\n\ + \nEnter the value as `true` for the payment gateways that do not\ + \ allow to retrieve the payment method details. Once passed, it\ + \ will create payment method at Chargebee with the provided attributes\ + \ in `payment_method_token`, `customer_profile_token`, `network_transaction_id`,\ + \ `mandate_id`, `card`, and `billing_address`. \n**Note:**\n\n\ + Currently, the `skip_retrieval` value as `true` is only supported\ + \ for the Vantiv payment gateway.\n" + deprecated: false + default: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`checkout_com\`: While adding a new payment method using \[permanent token\](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, \`document\` ID and \`country_of_residence\` are required to support payments through \[dLocal\](https://docs.checkout.com/payment-methods/cards/dlocal). \* \`payer\`: User related information. \* \`country_of_residence\`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a \[two-character ISO code\](https://docs.checkout.com/resources/codes/country-codes). \* \`document\`: Document ID is the user's \[identification number\](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. \* \`bluesnap\`: While passing raw card details to BlueSnap, if \`fraud_session_id\` is added, \[additional validation\](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your \[BlueSnap fraud session ID\](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. \* \`braintree\`: While passing raw card details to Braintree, your \`fraud_merchant_id\` and the user's \`device_session_id\` can be added to perform \[additional validation\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`fraud_merchant_id\`: Your \[merchant ID\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. \* \`chargebee_payments\`: While passing raw card details to Chargebee Payments, if \`fraud_session_id\` is added, additional validation is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. \* \`bank_of_america\`: While passing raw card details to Bank of America, your user's \`device_session_id\` can be added to perform additional validation and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`ecentric\`: This parameter is used to verify and process payment method details in Ecentric. If the \`merchant_id\` parameter is included, Chargebee will vault it / perform a lookup and verification against this \`merchant_id\`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. \* \`merchant_id\`: Merchant GUID where the card is vaulted or need to be vaulted. \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries and \`device_session_id\` can be added to perform \[additional validation\](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device . + deprecated: false + card: + type: object + properties: + last4: + maxLength: 4 + minLength: 4 + type: string + description: | + Last four digits of the card number + deprecated: false + iin: + maxLength: 6 + minLength: 6 + type: string + description: | + The Issuer Identification Number, i.e. the first six digits of the card number + deprecated: false + expiry_month: + maximum: 12 + minimum: 1 + type: integer + description: | + Card expiry month. + format: int32 + deprecated: false + expiry_year: + type: integer + description: | + Card expiry year. + format: int32 + deprecated: false + brand: + type: string + description: | + Card brand \* jcb - A JCB card. \* cabal - A Cabal card. \* hipercard - An Hipercard. \* other - Card belonging to types other than those listed above. \* american_express - An American Express card. \* visa - A Visa card. \* cencosud - A Cencosud card. \* bancontact - A Bancontact card. \* cmr_falabella - A CMR Falabella card. \* not_applicable - Used for offline entries in transactions. Not applicable for cards \* rupay - A Rupay card. \* maestro - A Maestro card. \* carnet - A Carnet card. \* nativa - A Nativa card. \* discover - A Discover card. \* argencard - An Argencard. \* tarjeta_naranja - A Tarjeta Naranja card. \* elo - A Elo card. \* diners_club - A Diner's Club card. \* mastercard - A MasterCard. + deprecated: false + enum: + - visa + - mastercard + - american_express + - discover + - jcb + - diners_club + - other + - bancontact + - cmr_falabella + - tarjeta_naranja + - nativa + - cencosud + - cabal + - argencard + - elo + - hipercard + - carnet + - rupay + - maestro + funding_type: + type: string + description: | + Card Funding type \* not_known - An unknown card. \* prepaid - A prepaid card. \* debit - A debit card. \* credit - A credit card. \* not_applicable - Used for ACH. Not applicable for cards + deprecated: false + enum: + - credit + - debit + - prepaid + - not_known + description: | + Parameters of tokenized card details + deprecated: false + billing_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the billing contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the billing contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements).\ + \ \n**Brexit**\n\n\nIf you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + description: | + Parameters for billing_address + deprecated: false + encoding: + billing_address: + style: deepObject + explode: true + card: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - payment_source + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + payment_source: + $ref: '#/components/schemas/PaymentSource' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /payment_sources/{cust-payment-source-id}/delete: + post: + summary: Delete a payment source + description: "Deletes a payment source. Once the payment source is deleted,\ + \ if\n\n* **Deleted payment source is Primary, and Backup is available**\n\ + \ * The Backup payment source will become the Primary payment source.\n*\ + \ **Deleted payment source is Primary, and no Backup is available**\n * The\ + \ other payment source available, but not assigned to any subscription, will\ + \ become the Primary payment source. **Note** : *When multiple payment sources\ + \ exist, the payment method added most recently will be considered*.\n\n \ + \ * If other payment sources available are assigned to subscriptions, the\ + \ auto collection attribute for the customer will be set to Off, and the events\ + \ *card_deleted* and *payment_source_deleted* will be triggered.\n* **Deleted\ + \ payment source is attached to subscriptions**\n * Dunning will be initiated\ + \ for subscriptions attached to this payment source if auto collection is\ + \ set to On, and when no customer default is present.\n\n\n\nIf there is no\ + \ such payment source present in the gateway for the customer, this API will\ + \ return successfully without throwing any error. \n**Note** : \nIf you\ + \ delete the only available payment method of a customer in Chargebee, it\ + \ also deletes the customer's record at the gateway. To delete the payment\ + \ method locally(delete only in Chargebee), use [Local Delete a Payment Source\ + \ API](/docs/api/payment_sources#local_delete_a_payment_source).\n" + operationId: delete_a_payment_source + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?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:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: cust-payment-source-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - payment_source + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + payment_source: + $ref: '#/components/schemas/PaymentSource' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /payment_sources/create_card: + post: + summary: Create a card payment source + description: | + Storing card after successful 3DS completion is not supported in this API. Use [create using Payment Intent API](/docs/api/payment_sources#create_using_payment_intent) under Payment source to store the card after successful 3DS flow completion. + operationId: create_a_card_payment_source + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-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?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - customer_id + type: object + properties: + customer_id: + maxLength: 50 + type: string + description: | + Identifier of the customer with whom this payment source is associated. + deprecated: false + replace_primary_payment_source: + type: boolean + description: | + Indicates whether the primary payment source should be replaced with this payment source. In case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False. + deprecated: false + default: false + card: + required: + - expiry_month + - expiry_year + - number + type: object + properties: + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account in which this payment source is stored. + deprecated: false + first_name: + maxLength: 50 + type: string + description: | + Cardholder's first name + deprecated: false + last_name: + maxLength: 50 + type: string + description: | + Cardholder's last name + deprecated: false + number: + maxLength: 1500 + type: string + description: | + The credit card number without any format. If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js), you can specify the Braintree encrypted card number here. + deprecated: false + expiry_month: + maximum: 12 + minimum: 1 + type: integer + description: | + Card expiry month. + format: int32 + deprecated: false + expiry_year: + type: integer + description: | + Card expiry year. + format: int32 + deprecated: false + cvv: + maxLength: 520 + type: string + description: | + The card verification value (CVV). If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js), you can specify the Braintree encrypted CVV here. + deprecated: false + billing_addr1: + maxLength: 150 + type: string + description: | + Address line 1, as available in card billing address. + deprecated: false + billing_addr2: + maxLength: 150 + type: string + description: | + Address line 2, as available in card billing address. + deprecated: false + billing_city: + maxLength: 50 + type: string + description: | + City, as available in card billing address. + deprecated: false + billing_state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + billing_state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + billing_zip: + maxLength: 20 + type: string + description: | + Postal or Zip code, as available in card billing address. + deprecated: false + billing_country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`checkout_com\`: While adding a new payment method using \[permanent token\](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, \`document\` ID and \`country_of_residence\` are required to support payments through \[dLocal\](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). \* \`payer\`: User related information. \* \`country_of_residence\`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a \[two-character ISO code\](https://docs.checkout.com/resources/codes/country-codes). \* \`document\`: Document ID is the user's \[identification number\](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. \* \`bluesnap\`: While passing raw card details to BlueSnap, if \`fraud_session_id\` is added, \[additional validation\](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your \[BlueSnap fraud session ID\](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. \* \`braintree\`: While passing raw card details to Braintree, your \`fraud_merchant_id\` and the user's \`device_session_id\` can be added to perform \[additional validation\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`fraud_merchant_id\`: Your \[merchant ID\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. \* \`chargebee_payments\`: While passing raw card details to Chargebee Payments, if \`fraud_session_id\` is added, additional validation is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. \* \`bank_of_america\`: While passing raw card details to Bank of America, your user's \`device_session_id\` can be added to perform additional validation and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`ecentric\`: This parameter is used to verify and process payment method details in Ecentric. If the \`merchant_id\` parameter is included, Chargebee will vault it / perform a lookup and verification against this \`merchant_id\`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. \* \`merchant_id\`: Merchant GUID where the card is vaulted or need to be vaulted. \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries and \`device_session_id\` can be added to perform \[additional validation\](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device + deprecated: false + description: | + Parameters for card + deprecated: false + encoding: + card: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - payment_source + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + payment_source: + $ref: '#/components/schemas/PaymentSource' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /payment_sources/{cust-payment-source-id}/verify_bank_account: + post: + summary: Verify bank account payment source + description: | + This API can be used to verify bank accounts which have been added as payment source. This is applicable for **Stripe ACH with micro-deposit mode bank accounts** only. Stripe handles verification in two ways - via Plaid, and micro-deposit. + + For verifying bank accounts via **micro-deposit**, Stripe deposits two small amounts to the bank account being added. These deposits will take 1-2 business days to appear on the customer's bank statement. The bank statement description for the two micro-deposits contains the amount and the values deposited. Your customer will need to relay the value of the two deposits to you, after which you can verify the bank account. Once the bank account has been verified, the payment source will be marked as "Valid". + operationId: verify_bank_account_payment_source + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F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(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: cust-payment-source-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - amount1 + - amount2 + type: object + properties: + amount1: + minimum: 0 + type: integer + description: | + Value of the micro-deposits sent to the bank account. + format: int64 + deprecated: false + amount2: + minimum: 0 + type: integer + description: | + Value of the micro-deposits sent to the bank account. + format: int64 + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - payment_source + type: object + properties: + payment_source: + $ref: '#/components/schemas/PaymentSource' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /payment_sources: + get: + summary: List payment sources + description: | + Lists all the payment sources + operationId: list_payment_sources + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|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})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: subscription_id + in: query + description: Unique subscription identifier that helps to retrieve the payment + source of a subscription which has mandate associated to it. + required: false + deprecated: false + style: form + explode: true + schema: + maxLength: 50 + type: string + deprecated: false + - name: customer_id + in: query + description: "optional, string filter
To\ + \ filter based on Customer Id.
Supported operators : is, is_not,\ + \ starts_with, in, not_in

Example customer_id[is] = \"3bdjnDnsdQn\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: 3bdjnDnsdQn + deprecated: false + - name: type + in: query + description: "optional, enumerated string filter
Type\ + \ of payment source. Possible values are : card, paypal_express_checkout,\ + \ amazon_payments, direct_debit, generic, alipay, unionpay, apple_pay, wechat_pay,\ + \ ideal, google_pay, sofort, bancontact, giropay, dotpay, upi, netbanking_emandates.
Supported\ + \ operators : is, is_not, in, not_in

Example type[is] = \"card\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`card\` - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource. \* \`paypal_express_checkout\` - Payments made via PayPal Express Checkout. \* \`amazon_payments\` - Payments made via Amazon Payments. \* \`direct_debit\` - Represents bank account for which the direct debit or ACH agreement/mandate is created. \* \`generic\` - Payments made via Generic Payment Method. \* \`alipay\` - Payments made via Alipay. \* \`unionpay\` - Payments made via UnionPay. \* \`apple_pay\` - Payments made via Apple Pay. \* \`wechat_pay\` - Payments made via WeChat Pay. \* \`ideal\` - Payments made via iDEAL. \* \`google_pay\` - Payments made via Google Pay. \* \`sofort\` - Payments made via Sofort. \* \`bancontact\` - Payments made via Bancontact Card. \* \`giropay\` - Payments made via giropay. \* \`dotpay\` - Payments made via Dotpay. \* \`upi\` - UPI Payments. \* \`netbanking_emandates\` - Netbanking (eMandates) Payments. \* \`venmo\` - Payments made via Venmo \* \`pay_to\` - Payments made via PayTo \* \`faster_payments\` - Payments made via Faster Payments \* \`sepa_instant_transfer\` - Payments made via Sepa Instant Transfer \* \`automated_bank_transfer\` - Represents virtual bank account using which the payment will be done. \* \`klarna_pay_now\` - Payments made via Klarna Pay Now + enum: + - card + - paypal_express_checkout + - amazon_payments + - direct_debit + - generic + - alipay + - unionpay + - apple_pay + - wechat_pay + - ideal + - google_pay + - sofort + - bancontact + - giropay + - dotpay + - upi + - netbanking_emandates + - venmo + - pay_to + - faster_payments + - sepa_instant_transfer + - automated_bank_transfer + - klarna_pay_now + is_not: + type: string + description: | + \* \`card\` - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource. \* \`paypal_express_checkout\` - Payments made via PayPal Express Checkout. \* \`amazon_payments\` - Payments made via Amazon Payments. \* \`direct_debit\` - Represents bank account for which the direct debit or ACH agreement/mandate is created. \* \`generic\` - Payments made via Generic Payment Method. \* \`alipay\` - Payments made via Alipay. \* \`unionpay\` - Payments made via UnionPay. \* \`apple_pay\` - Payments made via Apple Pay. \* \`wechat_pay\` - Payments made via WeChat Pay. \* \`ideal\` - Payments made via iDEAL. \* \`google_pay\` - Payments made via Google Pay. \* \`sofort\` - Payments made via Sofort. \* \`bancontact\` - Payments made via Bancontact Card. \* \`giropay\` - Payments made via giropay. \* \`dotpay\` - Payments made via Dotpay. \* \`upi\` - UPI Payments. \* \`netbanking_emandates\` - Netbanking (eMandates) Payments. \* \`venmo\` - Payments made via Venmo \* \`pay_to\` - Payments made via PayTo \* \`faster_payments\` - Payments made via Faster Payments \* \`sepa_instant_transfer\` - Payments made via Sepa Instant Transfer \* \`automated_bank_transfer\` - Represents virtual bank account using which the payment will be done. \* \`klarna_pay_now\` - Payments made via Klarna Pay Now + enum: + - card + - paypal_express_checkout + - amazon_payments + - direct_debit + - generic + - alipay + - unionpay + - apple_pay + - wechat_pay + - ideal + - google_pay + - sofort + - bancontact + - giropay + - dotpay + - upi + - netbanking_emandates + - venmo + - pay_to + - faster_payments + - sepa_instant_transfer + - automated_bank_transfer + - klarna_pay_now + in: + pattern: "^\\[(card|paypal_express_checkout|amazon_payments|direct_debit|generic|alipay|unionpay|apple_pay|wechat_pay|ideal|google_pay|sofort|bancontact|giropay|dotpay|upi|netbanking_emandates|venmo|pay_to|faster_payments|sepa_instant_transfer|automated_bank_transfer|klarna_pay_now)(,(card|paypal_express_checkout|amazon_payments|direct_debit|generic|alipay|unionpay|apple_pay|wechat_pay|ideal|google_pay|sofort|bancontact|giropay|dotpay|upi|netbanking_emandates|venmo|pay_to|faster_payments|sepa_instant_transfer|automated_bank_transfer|klarna_pay_now))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(card|paypal_express_checkout|amazon_payments|direct_debit|generic|alipay|unionpay|apple_pay|wechat_pay|ideal|google_pay|sofort|bancontact|giropay|dotpay|upi|netbanking_emandates|venmo|pay_to|faster_payments|sepa_instant_transfer|automated_bank_transfer|klarna_pay_now)(,(card|paypal_express_checkout|amazon_payments|direct_debit|generic|alipay|unionpay|apple_pay|wechat_pay|ideal|google_pay|sofort|bancontact|giropay|dotpay|upi|netbanking_emandates|venmo|pay_to|faster_payments|sepa_instant_transfer|automated_bank_transfer|klarna_pay_now))*\\\ + ]$" + type: string + example: card + deprecated: false + - name: status + in: query + description: "optional, enumerated string filter
Current\ + \ status of the payment source. Possible values are : valid, expiring,\ + \ expired, invalid, pending_verification.
Supported operators\ + \ : is, is_not, in, not_in

Example status[is] = \"valid\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`valid\` - A payment source that is valid and active. \* \`expiring\` - A payment source that is expiring (like card's status based on its expiry date). \* \`expired\` - A payment source that has expired \* \`invalid\` - The billing agreement cannot be used. It might become valid again either automatically or due to customer action. \* \`pending_verification\` - The payment source needs to be verified + enum: + - valid + - expiring + - expired + - invalid + - pending_verification + is_not: + type: string + description: | + \* \`valid\` - A payment source that is valid and active. \* \`expiring\` - A payment source that is expiring (like card's status based on its expiry date). \* \`expired\` - A payment source that has expired \* \`invalid\` - The billing agreement cannot be used. It might become valid again either automatically or due to customer action. \* \`pending_verification\` - The payment source needs to be verified + enum: + - valid + - expiring + - expired + - invalid + - pending_verification + in: + pattern: "^\\[(valid|expiring|expired|invalid|pending_verification)(,(valid|expiring|expired|invalid|pending_verification))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(valid|expiring|expired|invalid|pending_verification)(,(valid|expiring|expired|invalid|pending_verification))*\\\ + ]$" + type: string + example: valid + deprecated: false + - name: updated_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
Timestamp indicating when this payment source resource\ + \ was last updated.
Supported operators : after, before, on, between

Example\ + \ updated_at[on] = \"1435054328\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1435054328" + deprecated: false + - name: created_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
Timestamp indicating when this payment source resource\ + \ is created.
Supported operators : after, before, on, between

Example\ + \ created_at[on] = \"1435054328\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1435054328" + deprecated: false + - name: sort_by + in: query + description: "optional, string filter
Sorts\ + \ based on the specified attribute.
Supported attributes : created_at,\ + \ updated_at
Supported sort-orders : asc, desc

Example\ + \ sort_by[asc] = \"created_at\"\ +
This will sort the result based on the 'created_at' attribute in\ + \ ascending(earliest first) order." + required: false + style: deepObject + explode: true + schema: + minProperties: 1 + type: object + properties: + asc: + type: string + enum: + - created_at + - updated_at + desc: + type: string + enum: + - created_at + - updated_at + additionalProperties: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - payment_source + type: object + properties: + payment_source: + $ref: '#/components/schemas/PaymentSource' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /payment_sources/{cust-payment-source-id}/export_payment_source: + post: + summary: Export payment source + description: | + Copies this payment source information to the gateway specified in the API. + + This is useful if you want to port your customer's card details into another gateway. + operationId: export_payment_source + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,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+ type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: cust-payment-source-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - gateway_account_id + type: object + properties: + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account you want to copy the card. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - third_party_payment_method + type: object + properties: + third_party_payment_method: + $ref: '#/components/schemas/ThirdPartyPaymentMethod' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /payment_sources/create_using_payment_intent: + post: + summary: Create using payment intent + description: | + Used to attach the card to the customer after 3DS completion. [Learn more](/docs/api/3ds_card_payments) on the 3DS implementation via Chargebee APIs. + operationId: create_using_payment_intent + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-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-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - customer_id + type: object + properties: + customer_id: + maxLength: 50 + type: string + description: | + Identifier of the customer with whom this payment source is associated. + deprecated: false + replace_primary_payment_source: + type: boolean + description: | + Indicates whether the primary payment source should be replaced with this payment source. In case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False. + deprecated: false + default: false + payment_intent: + type: object + properties: + id: + maxLength: 150 + type: string + description: | + Identifier for PaymentIntent generated by Chargebee.js. Applicable only when you are using Chargebee.js for completing the 3DS flow. The PaymentIntent should be in 'authorized' state while passing it here. You need not pass other PaymentIntent parameters if this is passed. + deprecated: false + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account used for performing the 3DS flow. Applicable when you are using gateway APIs directly for completing the 3DS flow. + deprecated: false + gw_token: + maxLength: 65000 + type: string + description: | + Identifier for 3DS transaction/verification object at the gateway. Can be passed only after successfully completing the 3DS flow. Refer [3DS implementation in Chargebee](/docs/api/3ds_card_payments#3ds-gateway-side-implementation) to find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow. + deprecated: false + payment_method_type: + type: string + description: | + The list of payment method types (For example, card, ideal, sofort, bancontact, etc.) this Payment Intent is allowed to use. If payment method type is empty, Card is taken as the default type for all gateways except Razorpay. \* giropay - giropay \* paypal_express_checkout - paypal_express_checkout \* card - card \* venmo - Venmo \* klarna_pay_now - Klarna Pay Now \* sofort - sofort \* amazon_payments - Amazon Payments \* netbanking_emandates - netbanking_emandates \* dotpay - dotpay \* ideal - ideal \* faster_payments - Faster Payments \* upi - upi \* direct_debit - direct_debit \* sepa_instant_transfer - Sepa Instant Transfer \* bancontact - bancontact \* pay_to - PayTo \* boleto - boleto \* google_pay - google_pay \* apple_pay - apple_pay + deprecated: false + enum: + - card + - ideal + - sofort + - bancontact + - google_pay + - dotpay + - giropay + - apple_pay + - upi + - netbanking_emandates + - paypal_express_checkout + - direct_debit + - boleto + - venmo + - amazon_payments + - pay_to + - faster_payments + - sepa_instant_transfer + - klarna_pay_now + reference_id: + maxLength: 65000 + type: string + description: | + Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow. + deprecated: false + additional_info: + type: object + additionalProperties: true + description: | + Applicable only for Braintree gateway. Can be used only for Braintree's \[Premium Fraud Management Tools\](https://developer.paypal.com/braintree/articles/guides/fraud-tools/premium/overview). Pass a stringified JSON containing the \`device_session_id\` and \`fraud_merchant_id\` as an input to \`fingerprint\`. Here's a \[sample\](/docs/api/payment_parameters#payment_intent_additonal_info_sample) to it. + deprecated: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`checkout_com\`: While adding a new payment method using \[permanent token\](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, \`document\` ID and \`country_of_residence\` are required to support payments through \[dLocal\](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). \* \`payer\`: User related information. \* \`country_of_residence\`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a \[two-character ISO code\](https://docs.checkout.com/resources/codes/country-codes). \* \`document\`: Document ID is the user's \[identification number\](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. \* \`bluesnap\`: While passing raw card details to BlueSnap, if \`fraud_session_id\` is added, \[additional validation\](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your \[BlueSnap fraud session ID\](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. \* \`braintree\`: While passing raw card details to Braintree, your \`fraud_merchant_id\` and the user's \`device_session_id\` can be added to perform \[additional validation\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`fraud_merchant_id\`: Your \[merchant ID\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. \* \`chargebee_payments\`: While passing raw card details to Chargebee Payments, if \`fraud_session_id\` is added, additional validation is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. \* \`bank_of_america\`: While passing raw card details to Bank of America, your user's \`device_session_id\` can be added to perform additional validation and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`ecentric\`: This parameter is used to verify and process payment method details in Ecentric. If the \`merchant_id\` parameter is included, Chargebee will vault it / perform a lookup and verification against this \`merchant_id\`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. \* \`merchant_id\`: Merchant GUID where the card is vaulted or need to be vaulted. \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries and \`device_session_id\` can be added to perform \[additional validation\](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device + deprecated: false + description: | + Parameters for payment_intent + deprecated: false + encoding: + payment_intent: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - payment_source + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + payment_source: + $ref: '#/components/schemas/PaymentSource' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /payment_sources/{cust-payment-source-id}: + get: + summary: Retrieve a payment source + description: | + Retrieves the payment source identified by the unique identifier. + operationId: retrieve_a_payment_source + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(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9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: cust-payment-source-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - payment_source + type: object + properties: + payment_source: + $ref: '#/components/schemas/PaymentSource' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /payment_sources/create_voucher_payment_source: + post: + summary: Create a voucher payment method + description: | + Create a voucher payment method for the payment source. + operationId: create_a_voucher_payment_method + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,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25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - customer_id + type: object + properties: + customer_id: + maxLength: 50 + type: string + description: | + Identifier of the customer with whom this payment source is associated. + deprecated: false + voucher_payment_source: + required: + - voucher_type + type: object + properties: + voucher_type: + type: string + description: | + Voucher based payment methods \* boleto - Boleto + deprecated: false + enum: + - boleto + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account to which the payment method is associated. + deprecated: false + tax_id: + maxLength: 20 + type: string + description: | + Customer Tax id + deprecated: false + billing_address: + type: object + additionalProperties: true + description: | + The billing address of the customer. The value is a JSON object with the following keys and their values: \* \`first_name\`:(string, max chars=150) The first name of the contact. \* \`last_name\`:(string, max chars=150) The last name of the contact. \* \`line1\`:(string, max chars=180) The first line of the address. \* \`line2\`:(string, max chars=180) The second line of the address. \* \`country_code\`:(string, max chars=50) The two-letter, \[ISO 3166 alpha-2\](https://www.iso.org/iso-3166-country-codes.html) country code for the address. \* \`state_code\`:(string, max chars=50) The \[ISO 3166-2 state/province code\](https://www.iso.org/obp/ui/#search/code/) without the country prefix.For instance, for Arizona (USA), set state_code as \`AZ\` (not \`US-AZ\`). For Tamil Nadu (India), set as \`TN\` (not \`IN-TN\`). For British Columbia (Canada), set as \`BC\` (not \`CA-BC)\`. \* \`city\`:(string, max chars=50) The city name for the address. \* \`postal_code\`:(string, max chars=20) The postal or ZIP code for the address. \* \`phone\`:(string, max chars=50) The contact phone number for the address. \* \`email\`:(string, max chars=70) The contact email address for the address. + deprecated: false + description: | + Parameters for voucher_payment_source + deprecated: false + encoding: + voucher_payment_source: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - payment_source + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + payment_source: + $ref: '#/components/schemas/PaymentSource' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /payment_sources/create_using_temp_token: + post: + summary: Create using gateway temporary token + description: "This API offers an alternative way to create a payment source\ + \ using a single-use gateway temporary token, which is generally provided\ + \ by your payment gateway. In the case of Stripe, this temporary token is\ + \ generated according to the instruction detailed in [Stripe documentation](https://stripe.com/docs/api/tokens/create_card).\ + \ \nStoring card after successful 3DS completion is not supported in this\ + \ API. Use [create using Payment Intent API](/docs/api/payment_sources#create_using_payment_intent)\ + \ under Payment source to store the card after successful 3DS flow completion.\n" + operationId: create_using_gateway_temporary_token + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4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type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - customer_id + - tmp_token + - type + type: object + properties: + customer_id: + maxLength: 50 + type: string + description: | + Identifier of the customer with whom this payment source is associated. + deprecated: false + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account to which the payment source is associated. + deprecated: false + type: + type: string + description: | + Type of payment source. \* automated_bank_transfer - Represents virtual bank account using which the payment will be done. \* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created. \* unionpay - Payments made via UnionPay. \* paypal_express_checkout - Payments made via PayPal Express Checkout. \* alipay - Payments made via Alipay. \* venmo - Payments made via Venmo \* sofort - Payments made via Sofort. \* faster_payments - Payments made via Faster Payments \* google_pay - Payments made via Google Pay. \* wechat_pay - Payments made via WeChat Pay. \* ideal - Payments made via iDEAL. \* netbanking_emandates - Netbanking (eMandates) Payments. \* sepa_instant_transfer - Payments made via Sepa Instant Transfer \* upi - UPI Payments. \* dotpay - Payments made via Dotpay. \* bancontact - Payments made via Bancontact Card. \* pay_to - Payments made via PayTo \* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource. \* generic - Payments made via Generic Payment Method. \* amazon_payments - Payments made via Amazon Payments. \* giropay - Payments made via giropay. \* klarna_pay_now - Payments made via Klarna Pay Now \* apple_pay - Payments made via Apple Pay. + deprecated: false + enum: + - card + - paypal_express_checkout + - amazon_payments + - direct_debit + - generic + - alipay + - unionpay + - apple_pay + - wechat_pay + - ideal + - google_pay + - sofort + - bancontact + - giropay + - dotpay + - upi + - netbanking_emandates + - venmo + - pay_to + - faster_payments + - sepa_instant_transfer + - automated_bank_transfer + - klarna_pay_now + tmp_token: + maxLength: 65000 + type: string + description: | + Single-use token created by payment gateways. In Stripe, a single-use token is created for Apple Pay Wallet, card details or direct debit. In Braintree, a nonce is created for Apple Pay Wallet, PayPal, or card details. In Authorize.net, a nonce is created for card details. In Adyen, an encrypted data is created from the card details. + deprecated: false + issuing_country: + maxLength: 50 + type: string + description: | + 2-letter (alpha2) ISO country code. Indicates your customer's payment method country of issuance. Applicable for PayPal via Braintree. + deprecated: false + replace_primary_payment_source: + type: boolean + description: | + Indicates whether the primary payment source should be replaced with this payment source. In case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False. + deprecated: false + default: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`checkout_com\`: While adding a new payment method using \[permanent token\](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, \`document\` ID and \`country_of_residence\` are required to support payments through \[dLocal\](https://docs.checkout.com/payment-methods/cards/dlocal). \* \`payer\`: User related information. \* \`country_of_residence\`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a \[two-character ISO code\](https://docs.checkout.com/resources/codes/country-codes). \* \`document\`: Document ID is the user's \[identification number\](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. \* \`bluesnap\`: While passing raw card details to BlueSnap, if \`fraud_session_id\` is added, \[additional validation\](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your \[BlueSnap fraud session ID\](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. \* \`braintree\`: While passing raw card details to Braintree, your \`fraud_merchant_id\` and the user's \`device_session_id\` can be added to perform \[additional validation\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`fraud_merchant_id\`: Your \[merchant ID\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. \* \`chargebee_payments\`: While passing raw card details to Chargebee Payments, if \`fraud_session_id\` is added, additional validation is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. \* \`bank_of_america\`: While passing raw card details to Bank of America, your user's \`device_session_id\` can be added to perform additional validation and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`ecentric\`: This parameter is used to verify and process payment method details in Ecentric. If the \`merchant_id\` parameter is included, Chargebee will vault it / perform a lookup and verification against this \`merchant_id\`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. \* \`merchant_id\`: Merchant GUID where the card is vaulted or need to be vaulted. \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries and \`device_session_id\` can be added to perform \[additional validation\](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device . + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - payment_source + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + payment_source: + $ref: '#/components/schemas/PaymentSource' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /payment_sources/{cust-payment-source-id}/update_card: + post: + summary: Update a card payment source + description: "Merchants look to update card details when:\n\n* The billing address\ + \ of a customer has changed. In such a case, modify the billing address in\ + \ the Chargebee and the payment gateway.\n* The expiration date of the card\ + \ has been extended by the bank. (This usually happens when the date of card\ + \ expiry is in near future).\n\nMultiple parameters such as address, expiry\ + \ date, month, and so on, can be updated through this API.\n\nMeta data can\ + \ also be added additionally(supported in Stripe only). Metadata is a JSON\ + \ object. It is used to store additional information about customers.\n\n\ + In **Stripe** and **Braintree** payment gateways, changes in card details\ + \ are auto-updated. This feature can also be used for other payment gateways\ + \ in which auto-update is not enabled or is not supported by Chargebee. \n\ + **Note** : This endpoint supports Chargebee Test Gateway, [Stripe](https://www.chargebee.com/docs/2.0/stripe.html),\ + \ [Braintree](https://www.chargebee.com/docs/2.0/braintree.html), [Authorize.net](https://www.chargebee.com/docs/2.0/authorize-index.html),\ + \ [Worldpay US eCom](https://www.chargebee.com/docs/2.0/vantiv_worldpay.html),\ + \ and [WorldPay Direct Integration](https://www.chargebee.com/docs/2.0/worldpay-direct.html).\ + \ For all other gateways, your customers must re-enter the full [card details](/docs/api/payment_sources#update_a_card_payment_source_card_first_name)\ + \ to update existing card details. For example, consider a customer not using\ + \ the gateways mentioned above and wants to update the [card\\[billing_addr1\\\ + ]](/docs/api/payment_sources#update_a_card_payment_source_card_billing_addr1)\ + \ parameter. In such a case, the customer must re-enter the value of all the\ + \ parameters present in the [card](/docs/api/payment_sources#update_a_card_payment_source_card_first_name)\ + \ object.\n" + operationId: update_a_card_payment_source + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?: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-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: cust-payment-source-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + gateway_meta_data: + type: object + additionalProperties: true + description: | + Additional data about this resource can be passed to \*\*Stripe\*\* gateway here in the JSON Format. This will be stored along with payment source at the gateway account. + deprecated: false + reference_transaction: + maxLength: 50 + type: string + description: | + Reference transaction is used for future purchases. This is only applicable for Vantiv. + deprecated: false + card: + type: object + properties: + first_name: + maxLength: 50 + type: string + description: | + Cardholder's first name + deprecated: false + last_name: + maxLength: 50 + type: string + description: | + Cardholder's last name + deprecated: false + expiry_month: + maximum: 12 + minimum: 1 + type: integer + description: | + Card expiry month. + format: int32 + deprecated: false + expiry_year: + type: integer + description: | + Card expiry year. + format: int32 + deprecated: false + billing_addr1: + maxLength: 150 + type: string + description: | + Address line 1, as available in card billing address. + deprecated: false + billing_addr2: + maxLength: 150 + type: string + description: | + Address line 2, as available in card billing address. + deprecated: false + billing_city: + maxLength: 50 + type: string + description: | + City, as available in card billing address. + deprecated: false + billing_zip: + maxLength: 20 + type: string + description: | + Postal or Zip code, as available in card billing address. + deprecated: false + billing_state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + billing_state: + maxLength: 50 + type: string + description: | + The state/province name. + deprecated: false + billing_country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. + deprecated: false + description: | + Parameters for card + deprecated: false + encoding: + card: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - payment_source + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + payment_source: + $ref: '#/components/schemas/PaymentSource' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /payment_sources/{cust-payment-source-id}/switch_gateway_account: + post: + summary: Switch gateway account + description: | + Switches the gateway in which this payment source information is stored. + + This is applicable only if the payment source is present in Spreedly vault. + operationId: switch_gateway_account + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?: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9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: cust-payment-source-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - gateway_account_id + type: object + properties: + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account you want to switch to. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - payment_source + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + payment_source: + $ref: '#/components/schemas/PaymentSource' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /payment_sources/create_using_token: + post: + summary: Create using Chargebee token + description: | + Storing card after successful 3DS completion is not supported in this API. Use [create using Payment Intent API](/docs/api/payment_sources#create_using_payment_intent) under Payment source to store the card after successful 3DS flow completion. + operationId: create_using_chargebee_token + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a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]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - customer_id + - token_id + type: object + properties: + customer_id: + maxLength: 50 + type: string + description: | + Identifier of the customer with whom this payment source is associated. + deprecated: false + replace_primary_payment_source: + type: boolean + description: | + Indicates whether the primary payment source should be replaced with this payment source. In case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False. + deprecated: false + default: false + token_id: + maxLength: 40 + type: string + description: | + Token generated by Chargebee JS representing payment method details. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - payment_source + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + payment_source: + $ref: '#/components/schemas/PaymentSource' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /payment_sources/{cust-payment-source-id}/delete_local: + post: + summary: Local delete a payment source + description: | + Deletes a payment method from Chargebee. Payment method in the payment gateway will not be affected. + operationId: local_delete_a_payment_source + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a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?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: cust-payment-source-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - payment_source + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + payment_source: + $ref: '#/components/schemas/PaymentSource' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /payment_sources/create_bank_account: + post: + summary: Create a bank account payment source + description: "This API adds a Direct Debit payment source for a customer. The\ + \ bank account details collected from your customer are passed as input to\ + \ this API.\n\n#### [Automated Clearing House (ACH) Network](https://www.chargebee.com/docs/direct-debit-payments.html#direct-debit-payments-in-the-united-states)\n\ + \nACH is an electronic network for passing financial transactions in the US.\ + \ Chargebee currently supports ACH via [Stripe](https://www.chargebee.com/docs/ach-payments-stripe.html)\ + \ , [Authorize.Net](https://www.chargebee.com/docs/ach-payments-authorize_net.html),\ + \ and [GoCardless](https://www.chargebee.com/docs/2.0/gocardless.html). \n\ + **Note:**\n\n* For ACH via Stripe, it is mandatory to pass [user details](/docs/api/advanced-features#user_details)\ + \ such as IP address(`chargebee-request-origin-ip`) and the device information(`chargebee-request-origin-device`).\n\ + \n##### Bank account verification\n\nOnce the bank account has been added,\ + \ it needs to be verified.\n\n* For Stripe, perform this verification using\ + \ the [Verify bank account payment source API](/docs/api/payment_sources#verify_bank_account_payment_source).\n\ + * For [Authorize.net](https://www.authorize.net/), the verification is done\ + \ by them in 2-3 days after the account is added. No intervention is needed\ + \ from your side or your customer.\n\n\n\n#### Single Euro Payment Area (SEPA)\n\ + \nSEPA is an initiative that integrates bank transfer payments denominated\ + \ in euro. It is supported via [GoCardless](https://www.chargebee.com/docs/gocardless.html),\ + \ [Stripe](https://www.chargebee.com/docs/sepa-stripe.html) and [Adyen](https://www.chargebee.com/docs/adyen-sepa.html).\ + \ \n**Note:**\n\n* For SEPA via Stripe, it is mandatory to pass [user details](/docs/api/advanced-features#user_details)\ + \ such as IP address and device information.\n* For GoCardless, [local bank\ + \ details](https://developer.gocardless.com/api-reference/#appendix-local-bank-details)\ + \ can be passed instead of IBAN.\n\n#### Bacs Payment Schemes Limited (BACS)\ + \ and Bg Autogiro\n\nBacs is an organization that manages the Direct Debit\ + \ and Direct Credit payment methods in the UK. Bg Autogiro is a Direct Debit\ + \ scheme for krona denominated payments in Sweden. Both Bacs and Bg Autogiro\ + \ are supported via [GoCardless](https://www.chargebee.com/docs/gocardless.html).\ + \ \n**Note:**\n\n* For BACS via Stripe, it is mandatory to pass [user details](/docs/api/advanced-features#user_details)\ + \ such as IP address(`chargebee-request-origin-ip`) and the device information(`chargebee-request-origin-device`).\n\ + \n#### Bulk Electronic Clearing System (BECS) and Pre-Authorized Debit (PAD)\n\ + \nBECS is an automated payment method for Direct Debit in Australia and New\ + \ Zealand while PAD does the same for Canada. [GoCardless](https://www.chargebee.com/docs/gocardless.html)\ + \ supports both.\n\nFor Direct Debit, the customer needs to accept a mandate\ + \ that allows the merchant to debit their bank account. This agreement PDF\ + \ can be obtained using the [Retrieve direct debit agreement PDF API](/docs/api/hosted_pages#retrieve_direct_debit_agreement_pdf).\n\ + \nIf the customer has already reached the payment source limit allowed for\ + \ the site, pass `replace_primary_payment_source` as `true`. Alternatively,\ + \ [delete](/docs/api/payment_sources#delete_a_payment_source) one of the payment\ + \ sources first and then add the bank account payment source for the customer.\ + \ \n**Note:**\n\n* For BECS via Stripe, it is mandatory to pass [user details](/docs/api/advanced-features#user_details)\ + \ such as IP address(`chargebee-request-origin-ip`) and the device information(`chargebee-request-origin-device`).\n" + operationId: create_a_bank_account_payment_source + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9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9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - customer_id + type: object + properties: + customer_id: + maxLength: 50 + type: string + description: | + Identifier of the customer with whom this payment source is associated. + deprecated: false + issuing_country: + maxLength: 50 + type: string + description: | + 2-letter(alpha2) ISO country code. Required when local bank details are provided, and not IBAN. + deprecated: false + replace_primary_payment_source: + type: boolean + description: | + Indicates whether the primary payment source should be replaced with this payment source. In case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False. + deprecated: false + default: false + bank_account: + type: object + properties: + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account in which this payment source is stored. + deprecated: false + iban: + maxLength: 50 + minLength: 10 + type: string + description: | + Account holder's International Bank Account Number. For the [GoCardless](https://www.chargebee.com/docs/gocardless.html) platform, this can be the [local bank details](https://developer.gocardless.com/api-reference/#appendix-local-bank-details) + deprecated: false + first_name: + maxLength: 150 + type: string + description: | + Account holder's first name as per bank account. If not passed, details from customer details will be considered. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + Account holder's last name as per bank account. If not passed, details from customer details will be considered. + deprecated: false + company: + maxLength: 250 + type: string + description: | + Account holder's company name as per bank account. If not passed, details from customer details will be considered. + deprecated: false + email: + maxLength: 70 + type: string + description: | + Account holder's email address. If not passed, details from customer details will be considered. All Direct Debit compliant emails will be sent to this email address. + format: email + deprecated: false + phone: + maxLength: 50 + type: string + description: | + Phone number of the account holder that is linked to the bank account. + deprecated: false + bank_name: + maxLength: 100 + type: string + description: | + Name of account holder's bank. + deprecated: false + account_number: + maxLength: 17 + minLength: 4 + type: string + description: | + Account holder's bank account number. + deprecated: false + routing_number: + maxLength: 9 + minLength: 3 + type: string + description: | + Bank account routing number. + deprecated: false + bank_code: + maxLength: 20 + type: string + description: | + Indicates the bank code. + deprecated: false + account_type: + type: string + description: | + Represents the account type used to create a payment source. Available for [Authorize.net](https://www.authorize.net/) ACH and Razorpay NetBanking users only. If not passed, account type is taken as null. \* current - Current Account \* savings - Savings Account \* checking - Checking Account \* business_checking - Business Checking Account + deprecated: false + enum: + - checking + - savings + - business_checking + - current + account_holder_type: + type: string + description: | + For Stripe ACH users only. Indicates the account holder type. \* company - Company Account. \* individual - Individual Account. + deprecated: false + enum: + - individual + - company + echeck_type: + type: string + description: | + For Authorize.net ACH users only. Indicates the type of eCheck. \* ppd - Payment Authorization is prearranged between the customer and the merchant. \* web - Payment Authorization obtained from the customer via the internet. \* ccd - Payment Authorization agreement from the corporate customer is required. Applicable for business_checking account_type. + deprecated: false + enum: + - web + - ppd + - ccd + swedish_identity_number: + maxLength: 12 + minLength: 10 + type: string + description: | + For GoCardless Autogiro users only. The civic/company number (personnummer, samordningsnummer, or organisationsnummer) of the customer. Must be supplied if the customer's bank account is denominated in Swedish krona (SEK). This field cannot be changed once it has been set. + deprecated: false + billing_address: + type: object + additionalProperties: true + description: | + The billing address associated with the bank account. The value is a JSON object with the following keys and their values: \* \`first_name\`:(string, max chars=150) The first name of the contact. \* \`last_name\`:(string, max chars=150) The last name of the contact. \* \`company_name\`:(string, max chars=250) The company name for the address. \* \`line1\`:(string, max chars=180) The first line of the address. \* \`line2\`:(string, max chars=180) The second line of the address. \* \`country\`:(string) The name of the country for the address. \* \`country_code\`:(string, max chars=50) The two-letter, \[ISO 3166 alpha-2\](https://www.iso.org/iso-3166-country-codes.html) country code for the address. \* \`state\`:(string, max chars=50) The name of the state or province for the address. When not provided, this is set automatically for US, Canada, and India. \* \`state_code\`:(string, max chars=50) The \[ISO 3166-2 state/province code\](https://www.iso.org/obp/ui/#search/code/) without the country prefix. This is supported for USA, Canada, and India. For instance, for Arizona (USA), set state_code as \`AZ\` (not \`US-AZ\`). For Tamil Nadu (India), set as \`TN\` (not \`IN-TN\`). For British Columbia (Canada), set as \`BC\` (not \`CA-BC)\`. \* \`city\`:(string, max chars=50) The city name for the address. \* \`postal_code\`:(string, max chars=20) The postal or ZIP code for the address. \* \`phone\`:(string, max chars=50) The contact phone number for the address. \* \`email\`:(string, max chars=70) The contact email address for the address. + deprecated: false + description: | + Parameters for bank_account + deprecated: false + encoding: + bank_account: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - payment_source + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + payment_source: + $ref: '#/components/schemas/PaymentSource' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /payment_sources/{cust-payment-source-id}/update_bank_account: + post: + summary: Update a bank account payment source + description: |+ + This API is used to update the payment source details of a customer. Information related to bank account payment source such as email, first name, and last name can be updated. + + * For GoCardless, Chargebee supports (ACH,BACS,SEPA,AUTOGIRO,BECS,BECS_NZ,PAD). + * For Stripe, Chargebee only supports SEPA. + + + + operationId: update_a_bank_account_payment_source + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?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[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: cust-payment-source-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + bank_account: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + Account holder's first name as per bank account. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + Account holder's last name as per bank account. + deprecated: false + email: + maxLength: 70 + type: string + description: | + Account holder's email address. All Direct Debit compliant emails will be sent to this email address. + format: email + deprecated: false + description: | + Parameters for bank_account + deprecated: false + encoding: + bank_account: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - payment_source + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + payment_source: + $ref: '#/components/schemas/PaymentSource' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /virtual_bank_accounts/{virtual-bank-account-id}/delete_local: + post: + summary: Local delete a virtual bank account + description: | + Deletes virtual bank accounts from Chargebee. Payment method in the payment gateway, and Auto Collection settings in Chargebee are not affected. + operationId: local_delete_a_virtual_bank_account + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2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A-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: virtual-bank-account-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - virtual_bank_account + type: object + properties: + virtual_bank_account: + $ref: '#/components/schemas/VirtualBankAccount' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /virtual_bank_accounts/{virtual-bank-account-id}/delete: + post: + summary: Delete a virtual bank account + description: | + Deletes a virtual bank account. If there is no virtual bank account present in the gateway for the customer, this API will return successfully without throwing an error. + operationId: delete_a_virtual_bank_account + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f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:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: virtual-bank-account-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - virtual_bank_account + type: object + properties: + virtual_bank_account: + $ref: '#/components/schemas/VirtualBankAccount' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /virtual_bank_accounts: + get: + summary: List virtual bank accounts + description: | + Lists all the virtual bank accounts. + operationId: list_virtual_bank_accounts + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[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-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: customer_id + in: query + description: "optional, string filter
Identifier\ + \ of the customer.
Supported operators : is, is_not, starts_with,\ + \ in, not_in

Example customer_id[is]\ + \ = \"3bdjnDnsdQn\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: 3bdjnDnsdQn + deprecated: false + - name: updated_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
Timestamp indicating when this virtual bank account resource\ + \ was last updated.
Supported operators : after, before, on, between

Example\ + \ updated_at[after] = \"1435054328\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1435054328" + deprecated: false + - name: created_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
Timestamp indicating when this virtual bank account resource\ + \ is created.
Supported operators : after, before, on, between

Example\ + \ created_at[after] = \"1435054328\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1435054328" + deprecated: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - virtual_bank_account + type: object + properties: + virtual_bank_account: + $ref: '#/components/schemas/VirtualBankAccount' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + post: + summary: Create a virtual bank account + description: | + Creates a virtual bank account for a customer. Email address is mandatory for virtual bank account creation. All notifications related to this virtual bank account will be sent to the email address you specify. + operationId: create_a_virtual_bank_account + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9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a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - customer_id + type: object + properties: + customer_id: + maxLength: 50 + type: string + description: | + Identifier of the customer. + deprecated: false + email: + maxLength: 70 + type: string + description: | + Email address associated with the virtual bank account. + format: email + deprecated: false + scheme: + type: string + description: | + type of the credit transfer. \* mx_automated_bank_transfer - MX Automated Bank Transfer \* sepa_credit - SEPA Credit Transfer \* eu_automated_bank_transfer - EU Automated Bank Transfer \* ach_credit - ACH Credit Transfer \* jp_automated_bank_transfer - JP Automated Bank Transfer \* us_automated_bank_transfer - US Automated Bank Transfer \* gb_automated_bank_transfer - UK Automated Bank Transfer + deprecated: false + default: ach_credit + enum: + - ach_credit + - sepa_credit + - us_automated_bank_transfer + - gb_automated_bank_transfer + - eu_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - virtual_bank_account + type: object + properties: + virtual_bank_account: + $ref: '#/components/schemas/VirtualBankAccount' + customer: + $ref: '#/components/schemas/Customer' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /virtual_bank_accounts/{virtual-bank-account-id}: + get: + summary: Retrieve a virtual bank account + description: | + Retrieves the virtual bank account identified by the unique identifier. + operationId: retrieve_a_virtual_bank_account + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0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?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: virtual-bank-account-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - virtual_bank_account + type: object + properties: + virtual_bank_account: + $ref: '#/components/schemas/VirtualBankAccount' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /virtual_bank_accounts/create_using_permanent_token: + post: + summary: Create a virtual bank account using permanent token + description: | + Creates a virtual bank account using the identifier provided by the gateway. + operationId: create_a_virtual_bank_account_using_permanent_token + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?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:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - customer_id + - reference_id + type: object + properties: + customer_id: + maxLength: 50 + type: string + description: | + Identifier of the customer. + deprecated: false + reference_id: + maxLength: 150 + type: string + description: | + Identifier provided by the gateway for the virtual bank account source. In case of Stripe, the reference_id consists of a combination of Stripe Customer ID and Stripe Source ID separated by a forward slash (e.g. cus_63MnDn0t6kfDW7/src_6WjCF20vT9WN1G). + deprecated: false + scheme: + type: string + description: | + type of the credit transfer. \* mx_automated_bank_transfer - MX Automated Bank Transfer \* sepa_credit - SEPA Credit Transfer \* eu_automated_bank_transfer - EU Automated Bank Transfer \* ach_credit - ACH Credit Transfer \* jp_automated_bank_transfer - JP Automated Bank Transfer \* us_automated_bank_transfer - US Automated Bank Transfer \* gb_automated_bank_transfer - UK Automated Bank Transfer + deprecated: false + default: ach_credit + enum: + - ach_credit + - sepa_credit + - us_automated_bank_transfer + - gb_automated_bank_transfer + - eu_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - virtual_bank_account + type: object + properties: + virtual_bank_account: + $ref: '#/components/schemas/VirtualBankAccount' + customer: + $ref: '#/components/schemas/Customer' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/copy_card: + post: + summary: Copy card + description: "#### deprecated\n\nThe [Payment Sources API](/docs/api/payment_sources),\ + \ with its additional options and improvements, obsoletes the Cards APIs.\ + \ This request is obsoleted by the [Export payment source API](/docs/api/payment_sources#export_payment_source).\n\ + \nCopies the customer's card information to another payment gateway. This\ + \ is useful if you want to port your customer's card details to another gateway.\n\ + \n**Limitation** \nThis request does not support copying of cards between\ + \ Braintree and Stripe payment gateways. Contact [Chargebee Support](https://chargebee.freshdesk.com/support/home)\ + \ to perform those actions.\n" + operationId: copy_card + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?: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:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - gateway_account_id + type: object + properties: + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account you want to copy the card. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - third_party_payment_method + type: object + properties: + third_party_payment_method: + $ref: '#/components/schemas/ThirdPartyPaymentMethod' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /cards/{customer-id}: + get: + summary: Retrieve card for a customer + description: | + #### Deprecated + + This operation is obsoleted by the [Retrieve a payment source API](/docs/api/payment_sources#retrieve_a_payment_source). + + Retrieves the credit card for the customer id. + operationId: retrieve_card_for_a_customer + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - card + type: object + properties: + card: + $ref: '#/components/schemas/Card' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/switch_gateway: + post: + summary: Switch gateway + description: "#### Deprecated\n\nThis request is obsoleted by the [Switch gateway\ + \ account API](/docs/api/payment_sources#switch_gateway_account) for Payment\ + \ Sources.\n\nSwitches the gateway in which customer's card information is\ + \ stored. This is applicable only if the payment method is `card`.\n\n**Limitation**\ + \ \nThis request does not support switching between Braintree and Stripe\ + \ payment gateways. Contact [Chargebee Support](https://chargebee.freshdesk.com/support/home)\ + \ to perform those actions.\n" + operationId: switch_gateway + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(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:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - gateway_account_id + type: object + properties: + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account you want to switch to. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - card + - customer + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/delete_card: + post: + summary: Delete card for a customer + description: | + #### deprecated + + The [Payment Sources API](/docs/api/payment_sources), with its additional options and improvements, obsoletes the Cards APIs. This request is obsoleted by the [Delete a payment source API](/docs/api/payment_sources#delete_a_payment_source). + + Deletes the card for a customer. Upon successful deletion the `auto_collection` attribute for the customer is set to `off` and a `card_deleted` event is triggered. If there is no card found at the gateway for the customer, this API returns without errors. + operationId: delete_card_for_a_customer + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-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(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/credit_card: + post: + summary: Update card for a customer + description: | + #### Deprecated + + The [Payment Sources API](/docs/api/payment_sources), with its additional options and improvements, obsoletes the [Cards APIs](/docs/api/cards). This operation is obsoleted by the following: + + * [Create using temporary token](/docs/api/payment_sources#create_using_temporary_token) + * [Create using permanent token](/docs/api/payment_sources#create_using_permanent_token) + * [Create a card payment source](/docs/api/payment_sources#create_a_card_payment_source) + + Adds or replaces card details of a customer. Updating card details replaces the present payment method. + + Passing credit card details to this API involves PCI liability at your end as sensitive card info passes through your servers. If you wish to avoid that, you can use one of the following integration methodologies if applicable + + * If you are using Stripe gateway, you can use [Stripe.js](https://stripe.com/docs/stripe.js) with your card update form. + * If you are using Braintree gateway, you can use [Braintree.js](https://www.braintreepayments.com/docs/javascript) with your card update form. + * If you are using Authorize.Net gateway, you use [Accept.js](https://developer.authorize.net/api/reference/features/acceptjs.html) with your card update form. + * In case you are using the Adyen gateway, you will have to use the Adyen's [Client Side Encryption](https://docs.adyen.com/online-payments/classic-integrations/api-integration-ecommerce/cse-integration-ecommerce) to encrypt sensitive cardholder data. Once the cardholder data is encrypted, pass the value in adyen.encrypted.data as temp token in this API. + * You can also use our [Hosted Pages](https://www.chargebee.com/docs/hosted_pages.html) based integration. Use our [Hosted Page - Update Card](/docs/api/hosted_pages#update_card) API to generate a 'Update Card' Hosted Page link. + + + + **Legacy behavior:** + + * **For [sites](https://www.chargebee.com/docs/sites-intro.html) created before March 1st, 2014:** On making this request, the `billing_address` and `vat_number` of the customer are **deleted** and replaced by the values passed with this request. Ensure that you pass the [billing address parameters](/docs/api/subscriptions?prod_cat_ver=1#create_a_subscription_card_billing_addr1) and the `vat_number` parameters each time you make this request, to avoid losing the same information at the customer-level. + * **For [sites](https://www.chargebee.com/docs/sites-intro.html) created on or after March 1st, 2014:** This request does not alter the `billing_address` and `vat_number` of the customer. + operationId: update_card_for_a_customer + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-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::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - expiry_month + - expiry_year + - number + type: object + properties: + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account in which this payment source is stored. + deprecated: false + tmp_token: + maxLength: 300 + type: string + description: "The single-use card token returned by vaults like\ + \ Stripe/Braintree which act as a substitute for your card details.\ + \ Before calling this API, you should have submitted your card\ + \ details to the gateway and gotten this token in return. \n\ + **Note:** Supported only for Stripe, Braintree and Authorize.Net.\ + \ If this value is specified, there is no need to specify other\ + \ card details (like number, cvv, etc).\n" + deprecated: false + first_name: + maxLength: 50 + type: string + description: | + Cardholder's first name. + deprecated: false + last_name: + maxLength: 50 + type: string + description: | + Cardholder's last name. + deprecated: false + number: + maxLength: 1500 + type: string + description: | + The credit card number without any format. If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js), you can specify the Braintree encrypted card number here. + deprecated: false + expiry_month: + maximum: 12 + minimum: 1 + type: integer + description: | + Card expiry month. + format: int32 + deprecated: false + expiry_year: + type: integer + description: | + Card expiry year. + format: int32 + deprecated: false + cvv: + maxLength: 520 + type: string + description: | + The card verification value (CVV). If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js), you can specify the Braintree encrypted CVV here. + deprecated: false + billing_addr1: + maxLength: 150 + type: string + description: | + Address line 1, as available in card billing address. + deprecated: false + billing_addr2: + maxLength: 150 + type: string + description: | + Address line 2, as available in card billing address. + deprecated: false + billing_city: + maxLength: 50 + type: string + description: | + City, as available in card billing address. + deprecated: false + billing_state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + billing_state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + billing_zip: + maxLength: 20 + type: string + description: | + Postal or Zip code, as available in card billing address. + deprecated: false + billing_country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the system\ + \ will return an error. \n\n**Brexit**\n\n\nIf you have enabled\ + \ [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021\ + \ or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United Kingdom\ + \ -- Northern Ireland**) is available as an option.\n.\n" + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - card + - customer + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + card: + $ref: '#/components/schemas/Card' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /promotional_credits/{account-credit-id}: + get: + summary: Retrieve a promotional credit + description: | + This endpoint retrieves the promotional credit based on the promotional credit id + operationId: retrieve_a_promotional_credit + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]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:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: account-credit-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - promotional_credit + type: object + properties: + promotional_credit: + $ref: '#/components/schemas/PromotionalCredit' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /promotional_credits: + get: + summary: List promotional credits + description: | + This endpoint lists the promotional credits set for a customer + operationId: list_promotional_credits + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: id + in: query + description: "optional, string filter
Unique\ + \ reference ID provided for promotional credits.
Supported operators\ + \ : is, is_not, starts_with

Example id[is] = \"1bkfc8dw2o\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + example: 1bkfc8dw2o + deprecated: false + - name: created_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
Timestamp indicating when this promotional credit resource\ + \ is created.
Supported operators : after, before, on, between

Example\ + \ created_at[on] = \"1435054328\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1435054328" + deprecated: false + - name: type + in: query + description: "optional, enumerated string filter
Type\ + \ of promotional credits. Possible values are : increment, decrement.
Supported\ + \ operators : is, is_not, in, not_in

Example type[is] = \"increment\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`increment\` - Increment \* \`decrement\` - Decrement + enum: + - increment + - decrement + is_not: + type: string + description: | + \* \`increment\` - Increment \* \`decrement\` - Decrement + enum: + - increment + - decrement + in: + pattern: "^\\[(increment|decrement)(,(increment|decrement))*\\]$" + type: string + not_in: + pattern: "^\\[(increment|decrement)(,(increment|decrement))*\\]$" + type: string + example: increment + deprecated: false + - name: customer_id + in: query + description: "optional, string filter
Identifier\ + \ of the customer.
Supported operators : is, is_not, starts_with

Example\ + \ customer_id[is] = \"4gkYnd21ouvW\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + example: 4gkYnd21ouvW + deprecated: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - promotional_credit + type: object + properties: + promotional_credit: + $ref: '#/components/schemas/PromotionalCredit' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /promotional_credits/deduct: + post: + summary: Deduct Promotional Credits + description: | + This API call can be used to deduct promotional credits for a customer. [Learn more about Promotional Credits](https://www.chargebee.com/docs/2.0/credit-notes.html#creating-promotional-credits). + + For example, if a customer has a credit balance of $20, if you pass the **amount** as $5, then the customer's credit balance would become $15. + + If you do not pass any amount as the input parameter then, it will deduct the whole available amount from the credit balance. + operationId: deduct_promotional_credits + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-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:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - customer_id + - description + type: object + properties: + customer_id: + maxLength: 50 + type: string + description: | + Identifier of the customer. + deprecated: false + amount: + minimum: 0 + type: integer + description: | + Promotional credits amount. + format: int64 + deprecated: false + amount_in_decimal: + maxLength: 33 + type: string + description: | + Amount in decimal. + deprecated: false + currency_code: + maxLength: 3 + type: string + description: | + The currency code (ISO 4217 format) for promotional credit. + deprecated: false + description: + maxLength: 250 + type: string + description: | + Detailed description of this promotional credits. + deprecated: false + credit_type: + type: string + description: | + Type of promotional credits provided to customer. \* general - General \* referral_rewards - Referral \* loyalty_credits - Loyalty Credits + deprecated: false + default: general + enum: + - loyalty_credits + - referral_rewards + - general + reference: + maxLength: 500 + type: string + description: | + Describes why promotional credits were provided. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - promotional_credit + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + promotional_credit: + $ref: '#/components/schemas/PromotionalCredit' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /promotional_credits/set: + post: + summary: Set Promotional Credits + description: | + This API call can be used to set the promotional credits balance of a customer. [Learn more about Promotional Credits](https://www.chargebee.com/docs/2.0/credit-notes.html#creating-promotional-credits). + + For example, + + * If a customer has a credit balance of $10 and if you would like to set the balance to $100, you could pass the **amount** as $100. + * If a customer has a credit balance of $10 and if you would like to set the balance to $5, you could pass the **amount** as $5. + * If a customer has a credit balance of $10 and if you would like to clear the balance, you could pass the **amount** as $0. + operationId: set_promotional_credits + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0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?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - customer_id + - description + type: object + properties: + customer_id: + maxLength: 50 + type: string + description: | + Identifier of the customer. + deprecated: false + amount: + minimum: 0 + type: integer + description: | + Promotional credits amount. + format: int64 + deprecated: false + amount_in_decimal: + maxLength: 33 + type: string + description: | + Amount in decimal. + deprecated: false + currency_code: + maxLength: 3 + type: string + description: | + The currency code (ISO 4217 format) for promotional credit. + deprecated: false + description: + maxLength: 250 + type: string + description: | + Detailed description of this promotional credits. + deprecated: false + credit_type: + type: string + description: | + Type of promotional credits provided to customer. \* general - General \* referral_rewards - Referral \* loyalty_credits - Loyalty Credits + deprecated: false + default: general + enum: + - loyalty_credits + - referral_rewards + - general + reference: + maxLength: 500 + type: string + description: | + Describes why promotional credits were provided. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - promotional_credit + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + promotional_credit: + $ref: '#/components/schemas/PromotionalCredit' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /promotional_credits/add: + post: + summary: Add Promotional Credits + description: | + This API call can be used to add promotional credits to a customer. [Learn more about Promotional Credits](https://www.chargebee.com/docs/2.0/credit-notes.html#creating-promotional-credits). + + For example, if a customer has credits of $10, if you pass the **amount** as $10, then the customer's credit balance would become $20. + operationId: add_promotional_credits + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1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(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - customer_id + - description + type: object + properties: + customer_id: + maxLength: 50 + type: string + description: | + Identifier of the customer. + deprecated: false + amount: + minimum: 0 + type: integer + description: | + Promotional credits amount. + format: int64 + deprecated: false + amount_in_decimal: + maxLength: 33 + type: string + description: | + Amount in decimal. + deprecated: false + currency_code: + maxLength: 3 + type: string + description: | + The currency code (ISO 4217 format) for promotional credit. + deprecated: false + description: + maxLength: 250 + type: string + description: | + Detailed description of this promotional credits. + deprecated: false + credit_type: + type: string + description: | + Type of promotional credits provided to customer. \* general - General \* referral_rewards - Referral \* loyalty_credits - Loyalty Credits + deprecated: false + default: general + enum: + - loyalty_credits + - referral_rewards + - general + reference: + maxLength: 500 + type: string + description: | + Describes why promotional credits were provided. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - promotional_credit + type: object + properties: + customer: + $ref: '#/components/schemas/Customer' + promotional_credit: + $ref: '#/components/schemas/PromotionalCredit' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/delete_line_items: + post: + summary: Delete Line Items + description: | + This endpoint is used to delete line items from "Pending" invoice. + operationId: delete_line_items + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-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,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + line_items: + type: object + properties: + id: + type: array + description: | + Uniquely identifies a line_item + items: + maxLength: 40 + type: string + deprecated: false + description: | + The list of line items which have to be deleted. + deprecated: false + encoding: + line_items: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoice + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/remove_credit_note: + post: + summary: Remove credit note from an invoice + description: | + This API removes a credit note attached to an invoice. When you remove a credit note from an invoice, the invoice status returns to `not_paid`. + + **Note:** You cannot remove a credit note from an invoice if it has already been refunded. + operationId: remove_credit_note_from_an_invoice + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?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A-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + credit_note: + required: + - id + type: object + properties: + id: + maxLength: 50 + type: string + description: | + Credit-note id. + deprecated: false + description: | + Parameters for credit_note + deprecated: false + encoding: + credit_note: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - credit_note + - invoice + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + credit_note: + $ref: '#/components/schemas/CreditNote' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/remove_payment: + post: + summary: Remove payment from an invoice + description: | + This API [removes payments](https://www.chargebee.com/docs/2.0/invoice-operations.html#actions-for-paid-invoices_remove-payment) applied to an invoice. Once the applied payment is removed, the invoice status returns to `not_paid` or `payment_due`. The removed payment is then added to the customer's excess payment balance. + operationId: remove_payment_from_an_invoice + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|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:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + transaction: + required: + - id + type: object + properties: + id: + maxLength: 40 + type: string + description: | + Uniquely identifies the transaction. + deprecated: false + description: | + Parameters for transaction + deprecated: false + encoding: + transaction: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoice + - transaction + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + transaction: + $ref: '#/components/schemas/Transaction' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/stop_dunning: + post: + summary: Stop dunning for invoice + description: | + This API is used to stop dunning for "Payment Due" invoices that have been enabled for Auto Collection. When dunning is stopped, the status of the invoice will be changed to "Not Paid". + operationId: stop_dunning_for_invoice + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f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4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + comment: + maxLength: 300 + type: string + description: | + An internal [comment](./comments) to be added for this operation, to the invoice. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](./hosted_pages) or any document such as the [Invoice PDF](./invoices#retrieve_invoice_as_pdf). + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoice + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/apply_payments: + post: + summary: Apply payments for an invoice + description: | + The API applies [excess payments](https://apidocs.chargebee.com/docs/api/customers#customer_excess_payments) to an invoice. Once an excess payment is applied, the [invoice.amount_due](invoices#invoice_amount_due) is recalculated. The invoice `status` changes to either `paid` or `payment_due` depending on how much excess payment is applied to the invoice amount. + + For example, if you have an excess payment of $25.00, and the invoice to which you want to apply this excess payment has a balance of $50. Once you apply this excess payment, the invoice status changes to `paid`, and [invoice.amount_due](invoices#invoice_amount_due) is adjusted to $25.00. + operationId: apply_payments_for_an_invoice + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?: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-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + comment: + maxLength: 300 + type: string + description: | + An internal [comment](./comments) to be added for this operation, to the invoice. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](./hosted_pages) or any document such as the [Invoice PDF](./invoices#retrieve_invoice_as_pdf). + deprecated: false + transactions: + type: object + properties: + id: + type: array + description: | + Uniquely identifies the transaction. Excess payments available with the customer will be applied against this invoice if this parameter is not passed. + items: + maxLength: 40 + type: string + deprecated: false + amount: + type: array + description: | + Specifies the amount from the transaction to apply as a payment towards the invoice. The amount applied is the smallest of the following values: the amount you specify for this parameter, [transactions.unused_amount](invoices#invoice_amount_due), or [invoice.amount_due](invoices#invoice_amount_due). + items: + minimum: 1 + type: integer + format: int64 + deprecated: false + description: | + Parameters for transactions + deprecated: false + encoding: + transactions: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoice + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/void: + post: + summary: Void an invoice + description: | + Voids the specified invoice. Any payments must be [removed](/docs/api/invoices?prod_cat_ver=2#remove_payment_from_an_invoice) from the invoice before voiding it. + + * Any [promotional credits](/docs/api/promotional_credits?prod_cat_ver=2) or [credit notes](/docs/api/credit_notes?prod_cat_ver=2) applied to the invoice are removed. + * If an invoice for the current term of a subscription is voided and the subscription is changed later with `proration` enabled, no prorated credits are issued. + * Any [usages](/docs/api/usages?prod_cat_ver=2) associated with item prices in the invoice are delinked from the invoice. This is done by clearing the `invoice_id` field of said usages. However, before this is done, a [usage PDF](/docs/api/usages?prod_cat_ver=2#retrieve_usages_for_an_invoice_as_pdf) is generated and saved to the invoice as an [attachment](https://www.chargebee.com/docs/2.0/file-attachment.html). + operationId: void_an_invoice + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[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:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + comment: + maxLength: 300 + type: string + description: | + An internal [comment](./comments) to be added for this operation, to the invoice. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](./hosted_pages) or any document such as the [Invoice PDF](./invoices#retrieve_invoice_as_pdf). + deprecated: false + void_reason_code: + maxLength: 100 + type: string + description: | + Reason code for voiding the invoice. Select from a list of reason codes set in the Chargebee app in **Settings \> Configure Chargebee \> Reason Codes \> Invoices \> Void invoice**. Must be passed if set as mandatory in the app. The codes are case-sensitive. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoice + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + credit_note: + $ref: '#/components/schemas/CreditNote' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/add_charge: + post: + summary: Add one-time charge to a pending invoice + description: | + Adds a one-time charge to a [pending](https://apidocs.chargebee.com/docs/api/invoices#invoice_status) invoice. A one-time charge is a charge that is added ad hoc to the invoice and does not represent a predefined [item price](https:/apidocs.chargebee.com/docs/api/item_prices). It appears in the invoice as a [line_item](https://apidocs.chargebee.com/docs/api/invoices?prod_cat_ver=2&lang=curl#invoice_line_items) of [entity_type](https://apidocs.chargebee.com/docs/api/invoices?prod_cat_ver=2&lang=curl#invoice_line_items_entity_type) `adhoc`. + operationId: add_one-time_charge_to_a_pending_invoice + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(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9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - amount + - description + type: object + properties: + amount: + minimum: 1 + type: integer + description: | + The amount to be charged. The unit depends on the [type of currency](/docs/api#md_disabled). + format: int64 + deprecated: false + description: + maxLength: 250 + type: string + description: | + Detailed description about this lineitem. + deprecated: false + avalara_sale_type: + type: string + description: | + Indicates the type of sale carried out. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. \* retail - Transaction is a sale to an end user \* wholesale - Transaction is a sale to another company that will resell your product or service to another consumer \* vendor_use - Transaction is for an item that is subject to vendor use tax \* consumed - Transaction is for an item that is consumed directly + deprecated: false + enum: + - wholesale + - retail + - consumed + - vendor_use + avalara_transaction_type: + type: integer + description: | + Indicates the type of product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. + format: int32 + deprecated: false + avalara_service_type: + type: integer + description: | + Indicates the type of service for the product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. + format: int32 + deprecated: false + avalara_tax_code: + maxLength: 50 + type: string + description: | + This represents the Avalara tax code to which the one-time charge is mapped. Applicable only if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avatax-for-sales.html). + deprecated: false + hsn_code: + maxLength: 50 + type: string + description: | + The [HSN code](https://cbic-gst.gov.in/gst-goods-services-rates.html) to which the one-time charge is mapped for calculating the customer's tax in India. Applicable when both the conditions are true: + + * **[India](https://www.chargebee.com/docs/indian-gst.html#configuring-indian-gst)** has been enabled as a **Tax Region**. (An error is returned when this condition is not true.) + * The [**AvaTax for Sales** integration](https://www.chargebee.com/docs/avalara.html) has been enabled in Chargebee. + . + deprecated: false + taxjar_product_code: + maxLength: 50 + type: string + description: | + This represents the TaxJar product code to which the one-time charge is mapped. Applicable only if you use Chargebee's [TaxJar integration](https://www.chargebee.com/docs/taxjar.html). + deprecated: false + comment: + maxLength: 300 + type: string + description: | + An internal [comment](./comments) to be added for this operation, to the invoice. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](./hosted_pages) or any document such as the [Invoice PDF](./invoices#retrieve_invoice_as_pdf). + deprecated: false + subscription_id: + maxLength: 50 + type: string + description: | + Identifier of the subscription for which this charge needs to be created. Applicable for consolidated invoice. + deprecated: false + line_item: + type: object + properties: + date_from: + pattern: "^[0-9]{10}$" + type: integer + description: | + The time when the service period for the charge starts. + format: unix-time + deprecated: false + date_to: + pattern: "^[0-9]{10}$" + type: integer + description: | + The time when the service period for the charge ends. + format: unix-time + deprecated: false + description: | + Parameters for line_item + deprecated: false + encoding: + line_item: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoice + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/send_einvoice: + post: + summary: Send an einvoice for invoices + description: |+ + This endpoint is used to send an e-invoice for invoice. + + To support cases like TDS and invoice edits, we need to stop auto e-invoice sending and be able to send e-invoices manually. + + This endpoint schedules e-invoices manually. This operation is not allowed when any of the following condition matches: + + * If e-invoicing is not enabled at the site and customer level. + + * If there is an e-invoice generated already for the invoice. + + * If the "**Use automatic e-invoicing**" option is selected. + + * If there are no generated e-invoices with the `failed` or `skipped` status. + + * If the invoice status is `voided` or `pending`. + + operationId: send_an_einvoice_for_invoices + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?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|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoice + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/write_off: + post: + summary: Write off an invoice + description: | + This API writes off an Invoice. + operationId: write_off_an_invoice + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F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:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + comment: + maxLength: 300 + type: string + description: | + An internal [comment](./comments) to be added for this operation, to the invoice. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](./hosted_pages) or any document such as the [Invoice PDF](./invoices#retrieve_invoice_as_pdf). + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - credit_note + - invoice + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + credit_note: + $ref: '#/components/schemas/CreditNote' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/add_charge_item: + post: + summary: Add a charge-item to a pending invoice + description: | + This endpoint is used when [metered billing](https://www.chargebee.com/docs/2.0/metered_billing.html) is enabled and it adds a [charge-item price](./item_prices?prod_cat_ver=2) to a `pending` invoice. To collect the accumulated charges by closing the invoice, call [Close a pending invoice](./invoices?prod_cat_ver=2#close_a_pending_invoice). + operationId: add_a_charge-item_to_a_pending_invoice + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(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9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + comment: + maxLength: 300 + type: string + description: | + An internal [comment](./comments) to be added for this operation, to the invoice. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](./hosted_pages) or any document such as the [Invoice PDF](./invoices#retrieve_invoice_as_pdf). + deprecated: false + subscription_id: + maxLength: 50 + type: string + description: | + Identifier of the subscription for which this addon needs to be created. Applicable for consolidated invoice. + deprecated: false + item_price: + required: + - item_price_id + type: object + properties: + item_price_id: + maxLength: 100 + type: string + description: | + A unique ID for your system to identify the item price. + deprecated: false + quantity: + minimum: 1 + type: integer + description: | + Item price quantity + format: int32 + deprecated: false + quantity_in_decimal: + maxLength: 33 + type: string + description: | + The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units) is enabled. + deprecated: false + unit_price: + minimum: 0 + type: integer + description: | + The price or per-unit-price of the item price. By default, it is the [value set](/docs/api/item_prices#item_price_price) for the `item_price`. This is only applicable when the `pricing_model` of the `item_price` is `flat_fee` or `per_unit`. The value depends on the [type of currency](/docs/api/currencies#handling_currency_units). + format: int64 + deprecated: false + unit_price_in_decimal: + maxLength: 39 + type: string + description: | + The decimal representation of the price or per-unit price of the plan. The value is in major units of the currency. Always returned when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units) is enabled. + deprecated: false + date_from: + pattern: "^[0-9]{10}$" + type: integer + description: | + The time when the service period for the item starts. + format: unix-time + deprecated: false + date_to: + pattern: "^[0-9]{10}$" + type: integer + description: | + The time when the service period for the item ends. + format: unix-time + deprecated: false + description: | + Parameters for item_price + deprecated: false + item_tiers: + type: object + properties: + starting_unit: + type: array + description: | + The lowest value in the quantity tier. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + ending_unit: + type: array + description: | + The highest value in the quantity tier. + items: + type: integer + format: int32 + deprecated: false + price: + type: array + description: | + The per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. The total cost for the item price when the `pricing_model` is `stairstep`. The value is in the minor unit of the currency. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + default: 0 + starting_unit_in_decimal: + type: array + description: | + The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal` of the next lower tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + ending_unit_in_decimal: + type: array + description: | + The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal` of the next higher tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + price_in_decimal: + type: array + description: | + The decimal representation of the per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. When the `pricing_model` is `stairstep`, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/apicurrencies#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: | + Parameters for item_tiers + deprecated: false + encoding: + item_price: + style: deepObject + explode: true + item_tiers: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoice + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices: + get: + summary: List invoices + description: | + Lists all the Invoices. + operationId: list_invoices + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?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?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: include_deleted + in: query + description: "If set to true, includes the deleted resources in the response.\ + \ For the deleted resources in the response, the 'deleted'\ + \ attribute will be 'true'." + required: false + style: form + explode: true + schema: + type: boolean + default: false + - name: id + in: query + description: "optional, string filter
The\ + \ invoice number. Acts as a identifier for invoice and typically generated\ + \ sequentially.
Supported operators : is, is_not, starts_with,\ + \ in, not_in

Example id[is]\ + \ = \"INVOICE_654\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: INVOICE_654 + deprecated: false + - name: subscription_id + in: query + description: "optional, string filter
To\ + \ filter based on subscription_id.
NOTE: Not to be used if consolidated\ + \ invoicing is enabled.
Supported operators : is, is_not,\ + \ starts_with, is_present, in, not_in

Example subscription_id[is] = \"3bdjnDnsdQn\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: 3bdjnDnsdQn + deprecated: false + - name: customer_id + in: query + description: "optional, string filter
The\ + \ identifier of the customer this invoice belongs to.
Supported operators\ + \ : is, is_not, starts_with, in, not_in

Example customer_id[is] = \"3bdjnDnsdQn\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: 3bdjnDnsdQn + deprecated: false + - name: recurring + in: query + description: "optional, boolean filter
Boolean\ + \ indicating whether this invoice belongs to a subscription. Possible values\ + \ are : true, false
Supported operators : is

Example\ + \ recurring[is] = \"true\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + example: "true" + deprecated: false + - name: status + in: query + description: "optional, enumerated string filter
Current\ + \ status of this invoice. Possible values are : paid, posted, payment_due,\ + \ not_paid, voided, pending.
Supported operators : is, is_not,\ + \ in, not_in

Example status[is]\ + \ = \"paid\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: "\\* \\`paid\\` - Indicates a paid invoice. \\* \\`posted\\\ + ` - Indicates the payment is not yet collected and will be in this\ + \ state till the due date to indicate the due period \\* \\`payment_due\\\ + ` - Indicates the payment is not yet collected and is being retried\ + \ as per retry settings. \\* \\`not_paid\\` - Indicates the payment\ + \ is not made and all attempts to collect is failed. \\* \\`voided\\\ + ` - Indicates a voided invoice. \\* \\`pending\\` - \nThe [invoice](/docs/api/invoices?prod_cat_ver=2#invoice_status)\ + \ is yet to be closed (sent for payment collection). An invoice is\ + \ generated with this `status` when it has line items that belong\ + \ to items that are `metered` or when the `subscription.create_pending_invoices`attribute\ + \ is set to `true`. \nThe [invoice](/docs/api/invoices?prod_cat_ver=1#invoice_status)\ + \ is yet to be closed (sent for payment collection). All invoices\ + \ are generated with this `status` when [Metered Billing](https://www.chargebee.com/docs/1.0/metered_billing.html)\ + \ is enabled for the site.\n" + enum: + - paid + - posted + - payment_due + - not_paid + - voided + - pending + is_not: + type: string + description: "\\* \\`paid\\` - Indicates a paid invoice. \\* \\`posted\\\ + ` - Indicates the payment is not yet collected and will be in this\ + \ state till the due date to indicate the due period \\* \\`payment_due\\\ + ` - Indicates the payment is not yet collected and is being retried\ + \ as per retry settings. \\* \\`not_paid\\` - Indicates the payment\ + \ is not made and all attempts to collect is failed. \\* \\`voided\\\ + ` - Indicates a voided invoice. \\* \\`pending\\` - \nThe [invoice](/docs/api/invoices?prod_cat_ver=2#invoice_status)\ + \ is yet to be closed (sent for payment collection). An invoice is\ + \ generated with this `status` when it has line items that belong\ + \ to items that are `metered` or when the `subscription.create_pending_invoices`attribute\ + \ is set to `true`. \nThe [invoice](/docs/api/invoices?prod_cat_ver=1#invoice_status)\ + \ is yet to be closed (sent for payment collection). All invoices\ + \ are generated with this `status` when [Metered Billing](https://www.chargebee.com/docs/1.0/metered_billing.html)\ + \ is enabled for the site.\n" + enum: + - paid + - posted + - payment_due + - not_paid + - voided + - pending + in: + pattern: "^\\[(paid|posted|payment_due|not_paid|voided|pending)(,(paid|posted|payment_due|not_paid|voided|pending))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(paid|posted|payment_due|not_paid|voided|pending)(,(paid|posted|payment_due|not_paid|voided|pending))*\\\ + ]$" + type: string + example: paid + deprecated: false + - name: price_type + in: query + description: "optional, enumerated string filter
The\ + \ price type of the invoice. Possible values are : tax_exclusive, tax_inclusive.
Supported\ + \ operators : is, is_not, in, not_in

Example price_type[is] = \"tax_exclusive\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`tax_exclusive\` - All amounts in the document are exclusive of tax. \* \`tax_inclusive\` - All amounts in the document are inclusive of tax. + enum: + - tax_exclusive + - tax_inclusive + is_not: + type: string + description: | + \* \`tax_exclusive\` - All amounts in the document are exclusive of tax. \* \`tax_inclusive\` - All amounts in the document are inclusive of tax. + enum: + - tax_exclusive + - tax_inclusive + in: + pattern: "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\\ + ]$" + type: string + example: tax_exclusive + deprecated: false + - name: date + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
The document date displayed on the invoice PDF.
Supported\ + \ operators : after, before, on, between

Example date[on] = \"1394532759\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1394532759" + deprecated: false + - name: paid_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
Timestamp indicating the date & time this invoice got\ + \ paid.
Supported operators : after, before, on, between

Example\ + \ paid_at[before] = \"1394532759\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1394532759" + deprecated: false + - name: total + in: query + description: "optional, in cents filter
Invoiced\ + \ amount displayed in cents; that is, a decimal point is not present between\ + \ the whole number and the decimal part. For example, $499.99 is displayed\ + \ as 49999, and so on.
Supported operators : is, is_not, lt, lte,\ + \ gt, gte, between

Example \ + \ total[gt] = \"1000\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + example: "1000" + deprecated: false + - name: amount_paid + in: query + description: "optional, in cents filter
Payments\ + \ collected successfully for the invoice. This is the sum of linked_payments[].txn_amount\ + \ for all linked_payments[] that have txn_status\ + \ as success.
Supported operators : is, is_not, lt,\ + \ lte, gt, gte, between

Example amount_paid[lt] = \"800\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + example: "800" + deprecated: false + - name: amount_adjusted + in: query + description: "optional, in cents filter
Total\ + \ adjustments made against this invoice.
Supported operators : is,\ + \ is_not, lt, lte, gt, gte, between

Example amount_adjusted[gte] = \"100\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + example: "100" + deprecated: false + - name: credits_applied + in: query + description: "optional, in cents filter
Total\ + \ credits applied against this invoice.
Supported operators : is,\ + \ is_not, lt, lte, gt, gte, between

Example credits_applied[lte] = \"100\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + example: "100" + deprecated: false + - name: amount_due + in: query + description: "optional, in cents filter
The\ + \ unpaid amount that is due on the invoice. This is calculated as: total - amount_paid - sum of applied_credits.applied_amount - sum of adjustment_credit_notes.cn_total - sum of linked_taxes_withheld.amount.
Supported operators : is,\ + \ is_not, lt, lte, gt, gte, between

Example amount_due[lt] = \"200\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + example: "200" + deprecated: false + - name: dunning_status + in: query + description: "optional, enumerated string filter
Current\ + \ dunning status of the invoice. Possible values are : in_progress,\ + \ exhausted, stopped, success.
Supported operators : is,\ + \ is_not, in, not_in, is_present

Example dunning_status[is] = \"in_progress\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`in_progress\` - Dunning is still in progress. \* \`exhausted\` - Maximum number of attempts have been made. \* \`stopped\` - Dunning has stopped for this invoice. \* \`success\` - Payment successfully collected during dunning process. + enum: + - in_progress + - exhausted + - stopped + - success + is_not: + type: string + description: | + \* \`in_progress\` - Dunning is still in progress. \* \`exhausted\` - Maximum number of attempts have been made. \* \`stopped\` - Dunning has stopped for this invoice. \* \`success\` - Payment successfully collected during dunning process. + enum: + - in_progress + - exhausted + - stopped + - success + in: + pattern: "^\\[(in_progress|exhausted|stopped|success)(,(in_progress|exhausted|stopped|success))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(in_progress|exhausted|stopped|success)(,(in_progress|exhausted|stopped|success))*\\\ + ]$" + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + example: in_progress + deprecated: false + - name: payment_owner + in: query + description: "optional, string filter
Payment\ + \ owner of an invoice.
Supported operators : is, is_not, starts_with,\ + \ in, not_in

Example payment_owner[is]\ + \ = \"payment_customer\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: payment_customer + deprecated: false + - name: updated_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
To filter based on updated_at. This attribute\ + \ will be present only if the resource has been updated after 2016-09-28.\ + \ It is advisable when using this filter, to pass the sort_by\ + \ input parameter as updated_at for a faster response.
Supported\ + \ operators : after, before, on, between

Example updated_at[after] = \"1243545465\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1243545465" + deprecated: false + - name: channel + in: query + description: "optional, enumerated string filter
The\ + \ subscription channel this object originated from and is maintained in.\ + \ Possible values are : web, app_store, play_store.
Supported\ + \ operators : is, is_not, in, not_in

Example channel[is] = \"APP STORE\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: "\\* \\`web\\` - The object was created (and is maintained)\ + \ for the web channel directly in Chargebee via API or UI. \\* \\\ + `app_store\\` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this object via\ + \ UI or API is disallowed. \\* \\`play_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of this object\ + \ via UI or API is disallowed. \n\nIn-App Subscriptions is currently\ + \ in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com)\ + \ for more information.\n" + enum: + - web + - app_store + - play_store + is_not: + type: string + description: "\\* \\`web\\` - The object was created (and is maintained)\ + \ for the web channel directly in Chargebee via API or UI. \\* \\\ + `app_store\\` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this object via\ + \ UI or API is disallowed. \\* \\`play_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of this object\ + \ via UI or API is disallowed. \n\nIn-App Subscriptions is currently\ + \ in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com)\ + \ for more information.\n" + enum: + - web + - app_store + - play_store + in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + example: APP STORE + deprecated: false + - name: voided_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
Timestamp indicating the date & time this invoice got\ + \ voided.
Supported operators : after, before, on, between

Example\ + \ voided_at[on] = \"1394532759\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1394532759" + deprecated: false + - name: void_reason_code + in: query + description: "optional, string filter
Reason\ + \ code for voiding the invoice. Select from a list of reason codes set in\ + \ the Chargebee app in Settings > Configure Chargebee > Reason Codes\ + \ > Invoices > Void invoice. Must be passed if set as mandatory in the\ + \ app. The codes are case-sensitive.
Supported operators : is,\ + \ is_not, starts_with, in, not_in

Example void_reason_code[is_not] = \"Other\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: Other + deprecated: false + - name: sort_by + in: query + description: "optional, string filter
Sorts\ + \ based on the specified attribute.
Supported attributes : date,\ + \ updated_at
Supported sort-orders : asc, desc

Example\ + \ sort_by[asc] = \"date\"\ +
This will sort the result based on the 'date' attribute in ascending(earliest\ + \ first) order." + required: false + style: deepObject + explode: true + schema: + minProperties: 1 + type: object + properties: + asc: + type: string + enum: + - date + - updated_at + desc: + type: string + enum: + - date + - updated_at + additionalProperties: false + - name: einvoice + in: query + description: Parameters for einvoice + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + status: + type: object + properties: + is: + type: string + description: | + \* \`scheduled\` - Sending the e-invoice to the customer has been scheduled. \* \`skipped\` - The e-invoice was not sent. This could be due to missing information or because the `entity_identifier` is not registered on the e-invoicing network. \* \`in_progress\` - The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity. \* \`success\` - The e-invoice has been successfully delivered to the customer. \* \`failed\` - The e-invoice was sent and there was an error due to which it was not delivered. \* \`registered\` - The e-invoice was sent and there was an error due to which it was not delivered but got cleared in the IRP. + enum: + - scheduled + - skipped + - in_progress + - success + - failed + - registered + is_not: + type: string + description: | + \* \`scheduled\` - Sending the e-invoice to the customer has been scheduled. \* \`skipped\` - The e-invoice was not sent. This could be due to missing information or because the `entity_identifier` is not registered on the e-invoicing network. \* \`in_progress\` - The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity. \* \`success\` - The e-invoice has been successfully delivered to the customer. \* \`failed\` - The e-invoice was sent and there was an error due to which it was not delivered. \* \`registered\` - The e-invoice was sent and there was an error due to which it was not delivered but got cleared in the IRP. + enum: + - scheduled + - skipped + - in_progress + - success + - failed + - registered + in: + pattern: "^\\[(scheduled|skipped|in_progress|success|failed|registered)(,(scheduled|skipped|in_progress|success|failed|registered))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(scheduled|skipped|in_progress|success|failed|registered)(,(scheduled|skipped|in_progress|success|failed|registered))*\\\ + ]$" + type: string + description: | + The status of processing the e-invoice. To obtain detailed information about the current \`status\`, see \`message\`. + example: failed + deprecated: false + deprecated: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - invoice + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/close: + post: + summary: Close a pending invoice + description: | + Invoices for a subscription are created with a `pending` `status` when the subscription has `create_pending_invoices` attribute set to `true`. This API call finalizes a `pending` invoice. Any `refundable_credits` and `excess_payments` for the customer are applied to the invoice, and any payment due is collected automatically if `auto_collection` is `on` for the customer. + + #### Automation + + This operation can be automated by using a [site setting](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing). Moreover, the automation can be overridden at the [customer](/docs/api/customers?prod_cat_ver=2#customer_auto_close_invoices) and [subscription](/docs/api/subscriptions?prod_cat_ver=2#subscription_auto_close_invoices) level. + operationId: close_a_pending_invoice + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[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]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + comment: + maxLength: 300 + type: string + description: | + An internal [comment](./comments) to be added for this operation, to the invoice. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](./hosted_pages) or any document such as the [Invoice PDF](./invoices#retrieve_invoice_as_pdf). + deprecated: false + invoice_note: + maxLength: 2000 + type: string + description: | + A note for this particular invoice. This, and [all other notes](/docs/api/invoices#invoice_notes) for the invoice are displayed on the PDF invoice sent to the customer. + deprecated: false + remove_general_note: + type: boolean + description: | + Set as `true` to remove the **[general note](https://www.chargebee.com/docs/invoice_notes.html#adding-general-notes)** from this invoice. + deprecated: false + default: false + invoice_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + Set the [invoice date](https://apidocs.chargebee.com/docs/api/invoices#invoice_date). Must lie between the date when the invoice was generated and current date. Can only be passed when the site setting to allow overriding is enabled. If not passed, then the default value [set at the site level](https://www.chargebee.com/docs/metered_billing.html#overview) is used. + format: unix-time + deprecated: false + notes_to_remove: + type: object + properties: + entity_type: + type: array + items: + type: string + description: | + Type of entity to which the [note](./invoices#invoice_notes) belongs. To remove the general note, use the `remove_general_note` parameter. \* customer - Entity that represents a customer. \* plan - Entity that represents a plan. \* charge_item_price - Indicates that this line item is based on charge Item Price \* coupon - Entity that represents a coupon. \* addon - Entity that represents an addon. \* addon_item_price - Indicates that this line item is based on addon Item Price \* subscription - Entity that represents a subscription of customer. \* plan_item_price - Indicates that this line item is based on plan Item Price + deprecated: false + enum: + - customer + - subscription + - coupon + - plan_item_price + - addon_item_price + - charge_item_price + entity_id: + type: array + description: | + Unique identifier of the [note](https://apidocs.chargebee.com/docs/api/invoices#invoice_notes). + items: + maxLength: 100 + type: string + deprecated: false + description: | + Parameters for notes_to_remove + deprecated: false + encoding: + notes_to_remove: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoice + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/apply_credits: + post: + summary: Apply credits for an invoice + description: | + This API applies [available credits](customers#customer_balances) to an invoice. After credits are applied, [invoice.amount_due](invoices#invoice_amount_due) is recalculated. The invoice status changes to either `paid` or `payment_due` depending on how much credit is applied to the invoice amount. + operationId: apply_credits_for_an_invoice + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?: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(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + comment: + maxLength: 300 + type: string + description: | + An internal [comment](./comments) to be added for this operation, to the invoice. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](./hosted_pages) or any document such as the [Invoice PDF](./invoices#retrieve_invoice_as_pdf). + deprecated: false + credit_notes: + type: object + properties: + id: + type: array + description: | + The Credit Note number acts as an identifier for Credit Notes and is typically generated sequentially. Available refundable credits with the customer will be applied against this invoice if this paramenter is not passed. + items: + maxLength: 50 + type: string + deprecated: false + description: | + Parameters for credit_notes + deprecated: false + encoding: + credit_notes: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoice + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/installments: + post: + summary: Create installments for an invoice + description: | + Creates installments for an invoice, enabling the invoice to be paid in multiple, scheduled payments. **Note: The invoice must be in payment_due.** + operationId: create_installment_for_an_invoice + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .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])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - config_id + type: object + properties: + config_id: + type: string + description: | + The identifier of the installment_config used to create the installments. + deprecated: false + amount: + minimum: 0 + type: integer + description: | + The part of the invoice.amount_due to be distributed across the installments. If unspecified, the full invoice.amount_due is considered by default. + format: int64 + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoice + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}: + get: + summary: Retrieve an invoice + description: | + Retrieve the invoice for the specified invoice id. + operationId: retrieve_an_invoice + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?: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0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoice + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/create_for_charge_items_and_charges: + post: + summary: Create invoice for items and one-time charges + description: | + Creates an invoice for [charge-items](./items?prod_cat_ver=2) and [one-time charges](https://www.chargebee.com/docs/2.0/charges.html). The item prices must belong to items of `type` `charge`. + operationId: create_invoice_for_items_and_one-time_charges + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-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[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + customer_id: + maxLength: 50 + type: string + description: "Unique ID of the customer this invoice should be created\ + \ for. Either this or `subscription_id` must be provided. \n\ + **Note**\n\nThe invoice is [linked](/docs/api?prod_cat_ver=2#mbe-linked-be)\ + \ to the same [business entity](/docs/api?prod_cat_ver=2#mbe)\ + \ as this customer.\n.\n" + deprecated: false + subscription_id: + maxLength: 50 + type: string + description: "Unique ID of the subscription this invoice should\ + \ be created for. Either this or `customer_id` must be provided.\ + \ \n**Note**\n\nThe invoice is [linked](/docs/api?prod_cat_ver=2#mbe-linked-be)\ + \ to the same [business entity](/docs/api?prod_cat_ver=2#mbe)\ + \ as this subscription.\n.\n" + deprecated: false + currency_code: + maxLength: 3 + type: string + description: | + The currency code (ISO 4217 format) of the invoice amount. + deprecated: false + invoice_note: + maxLength: 2000 + type: string + description: | + A note for this particular invoice. This, and [all other notes](/docs/api/invoices#invoice_notes) for the invoice are displayed on the PDF invoice sent to the customer. + deprecated: false + remove_general_note: + type: boolean + description: | + Set as `true` to remove the **[general note](https://www.chargebee.com/docs/invoice_notes.html#adding-general-notes)** from this invoice. + deprecated: false + default: false + po_number: + maxLength: 100 + type: string + description: | + Purchase Order Number for this invoice. + deprecated: false + coupon_ids: + type: array + description: | + List of Coupons to be added. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + authorization_transaction_id: + maxLength: 40 + type: string + description: | + Authorization transaction to be captured. + deprecated: false + payment_source_id: + maxLength: 40 + type: string + description: | + Payment source to be used for this payment. + deprecated: false + auto_collection: + type: string + description: | + If specified, the customer level auto collection will be overridden. \* on - Whenever an invoice is created, an automatic attempt will be made to charge. \* off - Whenever an invoice is created as payment due. + deprecated: false + enum: + - "on" + - "off" + invoice_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The document date displayed on the invoice PDF. By default, it is the date of creation of the invoice or, when Metered Billing is enabled, it can be the date of closing the invoice. Provide this value to backdate the invoice (set the invoice date to a value in the past). Backdating an invoice is done for reasons such as booking revenue for a previous date or when the non-recurring charge is effective as of a past date. `taxes` and `line_item_taxes` are computed based on the tax configuration as of this date. The date should not be more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December. + format: unix-time + deprecated: false + token_id: + maxLength: 40 + type: string + description: | + Token generated by Chargebee JS representing payment method details. + deprecated: false + replace_primary_payment_source: + type: boolean + description: | + Indicates whether the primary payment source should be replaced with this payment source. In case of Create Subscription for Customer endpoint, the default value is True. Otherwise, the default value is False. + deprecated: false + default: false + retain_payment_source: + type: boolean + description: | + Indicates whether the payment source should be retained for the customer. + deprecated: false + default: true + payment_initiator: + type: string + description: | + The type of initiator to be used for the payment request triggered by this operation. \* customer - Pass this value to indicate that the request is initiated by the customer \* merchant - Pass this value to indicate that the request is initiated by the merchant + deprecated: false + enum: + - customer + - merchant + shipping_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for shipping_address + deprecated: false + statement_descriptor: + type: object + properties: + descriptor: + maxLength: 65000 + type: string + description: | + Payment descriptor text + deprecated: false + description: | + Parameters for statement_descriptor + deprecated: false + card: + type: object + properties: + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account in which this payment source is stored. + deprecated: false + first_name: + maxLength: 50 + type: string + description: | + Cardholder's first name + deprecated: false + last_name: + maxLength: 50 + type: string + description: | + Cardholder's last name + deprecated: false + number: + maxLength: 1500 + type: string + description: | + The credit card number without any format. If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js), you can specify the Braintree encrypted card number here. + deprecated: false + expiry_month: + maximum: 12 + minimum: 1 + type: integer + description: | + Card expiry month. + format: int32 + deprecated: false + expiry_year: + type: integer + description: | + Card expiry year. + format: int32 + deprecated: false + cvv: + maxLength: 520 + type: string + description: | + The card verification value (CVV). If you are using [Braintree.js](https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v2#getting-braintree.js), you can specify the Braintree encrypted CVV here. + deprecated: false + billing_addr1: + maxLength: 150 + type: string + description: | + Address line 1, as available in card billing address. + deprecated: false + billing_addr2: + maxLength: 150 + type: string + description: | + Address line 2, as available in card billing address. + deprecated: false + billing_city: + maxLength: 50 + type: string + description: | + City, as available in card billing address. + deprecated: false + billing_state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + billing_state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + billing_zip: + maxLength: 20 + type: string + description: | + Postal or Zip code, as available in card billing address. + deprecated: false + billing_country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`checkout_com\`: While adding a new payment method using \[permanent token\](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, \`document\` ID and \`country_of_residence\` are required to support payments through \[dLocal\](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). \* \`payer\`: User related information. \* \`country_of_residence\`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a \[two-character ISO code\](https://docs.checkout.com/resources/codes/country-codes). \* \`document\`: Document ID is the user's \[identification number\](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. \* \`bluesnap\`: While passing raw card details to BlueSnap, if \`fraud_session_id\` is added, \[additional validation\](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your \[BlueSnap fraud session ID\](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. \* \`braintree\`: While passing raw card details to Braintree, your \`fraud_merchant_id\` and the user's \`device_session_id\` can be added to perform \[additional validation\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`fraud_merchant_id\`: Your \[merchant ID\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. \* \`chargebee_payments\`: While passing raw card details to Chargebee Payments, if \`fraud_session_id\` is added, additional validation is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. \* \`bank_of_america\`: While passing raw card details to Bank of America, your user's \`device_session_id\` can be added to perform additional validation and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`ecentric\`: This parameter is used to verify and process payment method details in Ecentric. If the \`merchant_id\` parameter is included, Chargebee will vault it / perform a lookup and verification against this \`merchant_id\`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. \* \`merchant_id\`: Merchant GUID where the card is vaulted or need to be vaulted. \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries and \`device_session_id\` can be added to perform \[additional validation\](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device + deprecated: false + description: | + Parameters for card + deprecated: false + bank_account: + type: object + properties: + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account in which this payment source is stored. + deprecated: false + iban: + maxLength: 50 + minLength: 10 + type: string + description: | + Account holder's International Bank Account Number. For the [GoCardless](https://www.chargebee.com/docs/gocardless.html) platform, this can be the [local bank details](https://developer.gocardless.com/api-reference/#appendix-local-bank-details) + deprecated: false + first_name: + maxLength: 150 + type: string + description: | + Account holder's first name as per bank account. If not passed, details from customer details will be considered. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + Account holder's last name as per bank account. If not passed, details from customer details will be considered. + deprecated: false + company: + maxLength: 250 + type: string + description: | + Account holder's company name as per bank account. If not passed, details from customer details will be considered. + deprecated: false + email: + maxLength: 70 + type: string + description: | + Account holder's email address. If not passed, details from customer details will be considered. All Direct Debit compliant emails will be sent to this email address. + format: email + deprecated: false + phone: + maxLength: 50 + type: string + description: | + Phone number of the account holder that is linked to the bank account. + deprecated: false + bank_name: + maxLength: 100 + type: string + description: | + Name of account holder's bank. + deprecated: false + account_number: + maxLength: 17 + minLength: 4 + type: string + description: | + Account holder's bank account number. + deprecated: false + routing_number: + maxLength: 9 + minLength: 3 + type: string + description: | + Bank account routing number. + deprecated: false + bank_code: + maxLength: 20 + type: string + description: | + Indicates the bank code. + deprecated: false + account_type: + type: string + description: | + Represents the account type used to create a payment source. Available for [Authorize.net](https://www.authorize.net/) ACH and Razorpay NetBanking users only. If not passed, account type is taken as null. \* checking - Checking Account \* business_checking - Business Checking Account \* savings - Savings Account \* current - Current Account + deprecated: false + enum: + - checking + - savings + - business_checking + - current + account_holder_type: + type: string + description: | + For Stripe ACH users only. Indicates the account holder type. \* individual - Individual Account. \* company - Company Account. + deprecated: false + enum: + - individual + - company + echeck_type: + type: string + description: | + For Authorize.net ACH users only. Indicates the type of eCheck. \* ppd - Payment Authorization is prearranged between the customer and the merchant. \* ccd - Payment Authorization agreement from the corporate customer is required. Applicable for business_checking account_type. \* web - Payment Authorization obtained from the customer via the internet. + deprecated: false + enum: + - web + - ppd + - ccd + issuing_country: + maxLength: 50 + type: string + description: | + [two-letter(alpha2)](https://www.iso.org/iso-3166-country-codes.html) ISO country code. Required when local bank details are provided, and not IBAN. + deprecated: false + swedish_identity_number: + maxLength: 12 + minLength: 10 + type: string + description: | + For GoCardless Autogiro users only. The civic/company number (personnummer, samordningsnummer, or organisationsnummer) of the customer. Must be supplied if the customer's bank account is denominated in Swedish krona (SEK). This field cannot be changed once it has been set. + deprecated: false + billing_address: + type: object + additionalProperties: true + description: | + The billing address associated with the bank account. The value is a JSON object with the following keys and their values: \* \`first_name\`:(string, max chars=150) The first name of the contact. \* \`last_name\`:(string, max chars=150) The last name of the contact. \* \`company_name\`:(string, max chars=250) The company name for the address. \* \`line1\`:(string, max chars=180) The first line of the address. \* \`line2\`:(string, max chars=180) The second line of the address. \* \`country\`:(string) The name of the country for the address. \* \`country_code\`:(string, max chars=50) The two-letter, \[ISO 3166 alpha-2\](https://www.iso.org/iso-3166-country-codes.html) country code for the address. \* \`state\`:(string, max chars=50) The name of the state or province for the address. When not provided, this is set automatically for US, Canada, and India. \* \`state_code\`:(string, max chars=50) The \[ISO 3166-2 state/province code\](https://www.iso.org/obp/ui/#search/code/) without the country prefix. This is supported for USA, Canada, and India. For instance, for Arizona (USA), set state_code as \`AZ\` (not \`US-AZ\`). For Tamil Nadu (India), set as \`TN\` (not \`IN-TN\`). For British Columbia (Canada), set as \`BC\` (not \`CA-BC)\`. \* \`city\`:(string, max chars=50) The city name for the address. \* \`postal_code\`:(string, max chars=20) The postal or ZIP code for the address. \* \`phone\`:(string, max chars=50) The contact phone number for the address. \* \`email\`:(string, max chars=70) The contact email address for the address. + deprecated: false + description: | + Parameters for bank_account + deprecated: false + payment_method: + type: object + properties: + type: + type: string + description: | + The type of payment method. For more details refer [Update payment method for a customer](customers#update_payment_method_for_a_customer) API under Customer resource. \* google_pay - Payments made via Google Pay. \* sofort - Payments made via Sofort. \* netbanking_emandates - Netbanking (eMandates) Payments. \* apple_pay - Payments made via Apple Pay. \* unionpay - Payments made via UnionPay. \* giropay - Payments made via giropay. \* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created. \* bancontact - Payments made via Bancontact Card. \* upi - UPI Payments. \* alipay - Payments made via Alipay. \* pay_to - Payments made via PayTo \* wechat_pay - Payments made via WeChat Pay. \* sepa_instant_transfer - Payments made via Sepa Instant Transfer \* dotpay - Payments made via Dotpay. \* paypal_express_checkout - Payments made via PayPal Express Checkout. \* ideal - Payments made via iDEAL. \* generic - Payments made via Generic Payment Method. \* klarna_pay_now - Payments made via Klarna Pay Now \* faster_payments - Payments made via Faster Payments \* venmo - Payments made via Venmo \* automated_bank_transfer - Represents virtual bank account using which the payment will be done. \* amazon_payments - Payments made via Amazon Payments. \* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource. + deprecated: false + enum: + - card + - paypal_express_checkout + - amazon_payments + - direct_debit + - generic + - alipay + - unionpay + - apple_pay + - wechat_pay + - ideal + - google_pay + - sofort + - bancontact + - giropay + - dotpay + - upi + - netbanking_emandates + - venmo + - pay_to + - faster_payments + - sepa_instant_transfer + - automated_bank_transfer + - klarna_pay_now + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account in which this payment source is stored. + deprecated: false + reference_id: + maxLength: 200 + type: string + description: "The reference id. In the case of Amazon and PayPal\ + \ this will be the *billing agreement id* . For GoCardless\ + \ direct debit this will be 'mandate id'. In the case of card\ + \ this will be the identifier provided by the gateway/card\ + \ vault for the specific payment method resource. **Note:**\ + \ This is not the one-time temporary token provided by gateways\ + \ like Stripe. \nFor more details refer [Update payment\ + \ method for a customer](customers#update_payment_method_for_a_customer)\ + \ API under Customer resource.\n" + deprecated: false + tmp_token: + maxLength: 65000 + type: string + description: | + Single-use tokens created by payment gateways. In Stripe, a single-use token is created for Apple Pay Wallet, card details or direct debit. In Braintree, a nonce is created for Apple Pay Wallet, PayPal, or card details. In Authorize.Net, a nonce is created for card details. In Adyen, an encrypted data is created from the card details. + deprecated: false + issuing_country: + maxLength: 50 + type: string + description: "[ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\nIf you have enabled [EU\ + \ VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021\ + \ or have [manually\nenabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern\nIreland**) is available as an option.\n" + deprecated: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`checkout_com\`: While adding a new payment method using \[permanent token\](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, \`document\` ID and \`country_of_residence\` are required to support payments through \[dLocal\](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). \* \`payer\`: User related information. \* \`country_of_residence\`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a \[two-character ISO code\](https://docs.checkout.com/resources/codes/country-codes). \* \`document\`: Document ID is the user's \[identification number\](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. \* \`bluesnap\`: While passing raw card details to BlueSnap, if \`fraud_session_id\` is added, \[additional validation\](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your \[BlueSnap fraud session ID\](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. \* \`braintree\`: While passing raw card details to Braintree, your \`fraud_merchant_id\` and the user's \`device_session_id\` can be added to perform \[additional validation\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`fraud_merchant_id\`: Your \[merchant ID\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. \* \`chargebee_payments\`: While passing raw card details to Chargebee Payments, if \`fraud_session_id\` is added, additional validation is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. \* \`bank_of_america\`: While passing raw card details to Bank of America, your user's \`device_session_id\` can be added to perform additional validation and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`ecentric\`: This parameter is used to verify and process payment method details in Ecentric. If the \`merchant_id\` parameter is included, Chargebee will vault it / perform a lookup and verification against this \`merchant_id\`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. \* \`merchant_id\`: Merchant GUID where the card is vaulted or need to be vaulted. \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries and \`device_session_id\` can be added to perform \[additional validation\](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device + deprecated: false + description: | + Parameters for payment_method + deprecated: false + payment_intent: + type: object + properties: + id: + maxLength: 150 + type: string + description: | + Identifier for PaymentIntent generated by Chargebee.js. Applicable only when you are using Chargebee.js for completing the 3DS flow. The PaymentIntent should be in 'authorized' state while passing it here. You need not pass other PaymentIntent parameters if this is passed. + deprecated: false + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account used for performing the 3DS flow. + deprecated: false + gw_token: + maxLength: 65000 + type: string + description: | + Identifier for 3DS transaction/verification object at the gateway. Can be passed only after successfully completing the 3DS flow. Refer [3DS implementation in Chargebee](/docs/api/3ds_card_payments#3ds-gateway-side-implementation) to find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow. + deprecated: false + payment_method_type: + type: string + description: | + The list of payment method types (For example, card, ideal, sofort, bancontact, etc.) this Payment Intent is allowed to use. If payment method type is empty, Card is taken as the default type for all gateways except Razorpay. \* card - card \* dotpay - dotpay \* faster_payments - \* upi - upi \* google_pay - google_pay \* paypal_express_checkout - paypal_express_checkout \* klarna_pay_now - Klarna Pay Now \* ideal - ideal \* boleto - boleto \* direct_debit - direct_debit \* sepa_instant_transfer - \* bancontact - bancontact \* venmo - \* pay_to - \* netbanking_emandates - netbanking_emandates \* apple_pay - apple_pay \* giropay - giropay \* sofort - sofort \* amazon_payments - amazon_payments + deprecated: false + enum: + - card + - ideal + - sofort + - bancontact + - google_pay + - dotpay + - giropay + - apple_pay + - upi + - netbanking_emandates + - paypal_express_checkout + - direct_debit + - boleto + - venmo + - amazon_payments + - pay_to + - faster_payments + - sepa_instant_transfer + - klarna_pay_now + reference_id: + maxLength: 65000 + type: string + description: | + Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow. + deprecated: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`checkout_com\`: While adding a new payment method using \[permanent token\](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, \`document\` ID and \`country_of_residence\` are required to support payments through \[dLocal\](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). \* \`payer\`: User related information. \* \`country_of_residence\`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a \[two-character ISO code\](https://docs.checkout.com/resources/codes/country-codes). \* \`document\`: Document ID is the user's \[identification number\](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. \* \`bluesnap\`: While passing raw card details to BlueSnap, if \`fraud_session_id\` is added, \[additional validation\](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your \[BlueSnap fraud session ID\](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. \* \`braintree\`: While passing raw card details to Braintree, your \`fraud_merchant_id\` and the user's \`device_session_id\` can be added to perform \[additional validation\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`fraud_merchant_id\`: Your \[merchant ID\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. \* \`chargebee_payments\`: While passing raw card details to Chargebee Payments, if \`fraud_session_id\` is added, additional validation is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. \* \`bank_of_america\`: While passing raw card details to Bank of America, your user's \`device_session_id\` can be added to perform additional validation and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`ecentric\`: This parameter is used to verify and process payment method details in Ecentric. If the \`merchant_id\` parameter is included, Chargebee will vault it / perform a lookup and verification against this \`merchant_id\`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. \* \`merchant_id\`: Merchant GUID where the card is vaulted or need to be vaulted. \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries and \`device_session_id\` can be added to perform \[additional validation\](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device + deprecated: false + description: | + Parameters for payment_intent + deprecated: false + item_prices: + type: object + properties: + item_price_id: + type: array + description: | + A unique ID for your system to identify the item price. + items: + maxLength: 100 + type: string + deprecated: false + quantity: + type: array + description: | + Item price quantity + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + unit_price: + type: array + description: | + The price or per-unit-price of the item price. By default, it is the [value set](/docs/api/item_prices#item_price_price) for the `item_price`. This is only applicable when the `pricing_model` of the `item_price` is `flat_fee` or `per_unit`. The value depends on the [type of currency](/docs/api/#handling_currency_units). + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + unit_price_in_decimal: + type: array + description: | + The decimal representation of the price or per-unit price of the plan. The value is in major units of the currency. Always returned when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + date_from: + type: array + description: | + The time when the service period for the item starts. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + date_to: + type: array + description: | + The time when the service period for the item ends. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + description: | + Parameters for item_prices + deprecated: false + item_tiers: + type: object + properties: + item_price_id: + type: array + description: | + The id of the item price to which this tier belongs. + items: + maxLength: 100 + type: string + deprecated: false + starting_unit: + type: array + description: | + The lowest value in the quantity tier. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + ending_unit: + type: array + description: | + The highest value in the quantity tier. + items: + type: integer + format: int32 + deprecated: false + price: + type: array + description: | + The per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. The total cost for the item price when the `pricing_model` is `stairstep`. The value is in the minor unit of the currency. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + default: 0 + starting_unit_in_decimal: + type: array + description: | + The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal` of the next lower tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + ending_unit_in_decimal: + type: array + description: | + The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal` of the next higher tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + price_in_decimal: + type: array + description: | + The decimal representation of the per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. When the `pricing_model` is `stairstep`, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: | + Parameters for item_tiers + deprecated: false + charges: + type: object + properties: + amount: + type: array + description: | + The amount to be charged. The unit depends on the [type of currency](/docs/api?prod_cat_ver=1#md_disabled). + items: + minimum: 1 + type: integer + format: int64 + deprecated: false + amount_in_decimal: + type: array + description: | + The decimal representation of the amount for the [one-time charge](https://www.chargebee.com/docs/charges.html#one-time-charges ). Provide the value in major units of the currency. Can be provided only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: + type: array + description: | + Description for this charge + items: + maxLength: 250 + type: string + deprecated: false + taxable: + type: array + description: | + The amount to be charged is taxable or not. + items: + type: boolean + deprecated: false + default: true + tax_profile_id: + type: array + description: | + Tax profile of the charge. + items: + maxLength: 50 + type: string + deprecated: false + avalara_tax_code: + type: array + description: | + The Avalara tax codes to which items are mapped to should be provided here. Applicable only if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html). + items: + maxLength: 50 + type: string + deprecated: false + hsn_code: + type: array + description: | + The [HSN code](https://cbic-gst.gov.in/gst-goods-services-rates.html) to which the item is mapped for calculating the customer's tax in India. Applicable only when both of the following conditions are true: + + * **[India](https://www.chargebee.com/docs/indian-gst.html#configuring-indian-gst)** has been enabled as a **Tax Region**. (An error is returned when this condition is not true.) + * The [**AvaTax for Sales** integration](https://www.chargebee.com/docs/avalara.html) has been enabled in Chargebee. + items: + maxLength: 50 + type: string + deprecated: false + taxjar_product_code: + type: array + description: | + The TaxJar product codes to which items are mapped to should be provided here. Applicable only if you use Chargebee's [TaxJar integration](https://www.chargebee.com/docs/taxjar.html). + items: + maxLength: 50 + type: string + deprecated: false + avalara_sale_type: + type: array + items: + type: string + description: | + Indicates the type of sale carried out. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. \* vendor_use - Transaction is for an item that is subject to vendor use tax \* retail - Transaction is a sale to an end user \* consumed - Transaction is for an item that is consumed directly \* wholesale - Transaction is a sale to another company that will resell your product or service to another consumer + deprecated: false + enum: + - wholesale + - retail + - consumed + - vendor_use + avalara_transaction_type: + type: array + description: | + Indicates the type of product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. + items: + type: integer + format: int32 + deprecated: false + avalara_service_type: + type: array + description: | + Indicates the type of service for the product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. + items: + type: integer + format: int32 + deprecated: false + date_from: + type: array + description: | + The time when the service period for the charge starts. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + date_to: + type: array + description: | + The time when the service period for the charge ends. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + description: | + Parameters for charges + deprecated: false + notes_to_remove: + type: object + properties: + entity_type: + type: array + items: + type: string + description: | + Type of entity to which the [note](./invoices#invoice_notes) belongs. To remove the general note, use the `remove_general_note` parameter. \* charge_item_price - Indicates that this line item is based on charge Item Price \* plan_item_price - Indicates that this line item is based on plan Item Price \* coupon - Entity that represents a coupon. \* addon - Entity that represents an addon. \* addon_item_price - Indicates that this line item is based on addon Item Price \* plan - Entity that represents a plan. \* customer - Entity that represents a customer. \* subscription - Entity that represents a subscription of customer. + deprecated: false + enum: + - customer + - subscription + - coupon + - plan_item_price + - addon_item_price + - charge_item_price + entity_id: + type: array + description: | + Unique identifier of the [note](https://apidocs.chargebee.com/docs/api/invoices#invoice_notes). + items: + maxLength: 100 + type: string + deprecated: false + description: | + Parameters for notes_to_remove + deprecated: false + tax_providers_fields: + type: object + properties: + provider_name: + type: array + items: + maxLength: 50 + type: string + deprecated: false + field_id: + type: array + items: + maxLength: 50 + type: string + deprecated: false + field_value: + type: array + items: + maxLength: 50 + type: string + deprecated: false + description: | + Parameters for tax_providers_fields + deprecated: false + discounts: + required: + - apply_on + type: object + properties: + percentage: + type: array + description: | + The percentage of the original amount that should be deducted from it. Only applicable when `discount.type` is percentage. + items: + maximum: 100 + minimum: 0.01 + type: number + format: double + deprecated: false + amount: + type: array + description: | + The value of the discount. [The format of this value](https://apidocs.chargebee.com/docs/api?prod_cat_ver=2#currencies) depends on the kind of currency. This is only applicable when `discount.type` is `fixed_amount`. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + apply_on: + type: array + items: + type: string + description: | + The amount on the invoice to which the discount is applied. \* invoice_amount - The discount is applied to the invoice `sub_total`. \* specific_item_price - The discount is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id`. + deprecated: false + enum: + - invoice_amount + - specific_item_price + item_price_id: + type: array + description: | + The [id of the item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) in the subscription to which the discount is to be applied. Relevant only when `apply_on` = `specific_item_price`. + items: + maxLength: 100 + type: string + deprecated: false + description: | + Parameters for discounts + deprecated: false + encoding: + bank_account: + style: deepObject + explode: true + card: + style: deepObject + explode: true + charges: + style: deepObject + explode: true + discounts: + style: deepObject + explode: true + item_prices: + style: deepObject + explode: true + item_tiers: + style: deepObject + explode: true + notes_to_remove: + style: deepObject + explode: true + payment_intent: + style: deepObject + explode: true + payment_method: + style: deepObject + explode: true + shipping_address: + style: deepObject + explode: true + statement_descriptor: + style: deepObject + explode: true + tax_providers_fields: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoice + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/update_details: + post: + summary: Update invoice details + description: | + This API allows you to update the invoice Billing/Shipping address, VAT and PO number. During this operation if Billing Info (Billing Address, vat_number), Shipping info and PO number are not already present in the system the data will be added. If data is already present, the existing values will be replaced. If info is present in the system, but not passed as part of the request, the info will not be removed from the system. + + **Note:** Incase, tax is already applied will now vary due to address change, you cannot update the address. You cannot update the VAT Number if the billing address is not present in the API request.This will update the invoice only, it won't change the corresponding customer/subscription details. + operationId: update_invoice_details + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9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1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + vat_number: + maxLength: 20 + type: string + description: | + VAT/ Tax registration number of the customer. [Learn more](https://www.chargebee.com/docs/tax.html#capture-tax-registration-number). + deprecated: false + vat_number_prefix: + maxLength: 10 + type: string + description: "An overridden value for the first two characters of\ + \ the [full VAT\nnumber](https://en.wikipedia.org/wiki/VAT_identification_number).\ + \ Only applicable specifically for customers with [billing_address](customers#customer_billing_address)\ + \ `country` as `XI` (which is **United Kingdom - Northern Ireland**\ + \ ). \n\nWhen you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or have [manually\nenabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, you have the option of setting [billing_address](customers#customer_billing_address)\ + \ `country` as `XI`. That's the code for **United Kingdom - Northern\n\ + Ireland** . The first two characters of the VAT number in such\ + \ a case is `XI` by default. However, if the VAT number was registered\ + \ in UK, the value should be `GB`. Set `vat_number_prefix` to\ + \ `GB` for such cases.\n" + deprecated: false + po_number: + maxLength: 100 + type: string + description: | + Purchase Order Number for this invoice. + deprecated: false + comment: + maxLength: 300 + type: string + description: | + An internal [comment](./comments) to be added for this operation, to the invoice. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](./hosted_pages) or any document such as the [Invoice PDF](./invoices#retrieve_invoice_as_pdf). + deprecated: false + billing_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the billing contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the billing contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* invalid - Address is invalid. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* not_validated - Address is not yet validated. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for billing_address + deprecated: false + shipping_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for shipping_address + deprecated: false + statement_descriptor: + type: object + properties: + descriptor: + maxLength: 65000 + type: string + deprecated: false + deprecated: false + encoding: + billing_address: + style: deepObject + explode: true + shipping_address: + style: deepObject + explode: true + statement_descriptor: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoice + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/record_payment: + post: + summary: Record an invoice payment + description: | + To record a [offline payment](https://www.chargebee.com/docs/offline_payments.html) for an invoice. + + The invoice status will be marked as 'paid' if its amount due becomes 0 because of this recorded payment. + + **Note:** If the payment transaction amount is more than the invoice due amount, the remaining transaction amount will be added to the customer's Excess Payments balance to be used against other invoices. + operationId: record_an_invoice_payment + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-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9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + comment: + maxLength: 300 + type: string + description: | + Remarks, if any, on the payment. + deprecated: false + transaction: + required: + - payment_method + type: object + properties: + amount: + minimum: 1 + type: integer + description: | + The payment transaction amount. If not specified, this value will be the invoice's due amount. + format: int64 + deprecated: false + payment_method: + type: string + description: | + The payment method of this transaction \* cash - Cash \* paypal_express_checkout - Paypal Express Checkout \* automated_bank_transfer - Automated Bank Transfer \* venmo - Venmo \* bancontact - Bancontact \* custom - Custom \* ideal - IDEAL \* check - Check \* upi - upi \* sepa_instant_transfer - Sepa Instant Transfer \* alipay - Alipay \* sepa_credit - SEPA Credit \* ach_credit - ACH Credit \* faster_payments - Faster Payments \* sofort - Sofort \* direct_debit - Direct Debit \* bank_transfer - Bank Transfer \* chargeback - Only applicable for a transaction of [type](transactions#transaction_type) = `refund`. This value is set by Chargebee when an automated [chargeback](https://www.chargebee.com/docs/chargeback.html#chargeback-process) occurs. You can also set this explicitly when [recording a refund](transactions#record_an_offline_refund). \* unionpay - Unionpay \* apple_pay - Apple Pay \* dotpay - Dotpay \* netbanking_emandates - netbanking_emandates \* amazon_payments - Amazon Payments \* wechat_pay - WeChat Pay \* google_pay - Google Pay \* card - Card \* klarna_pay_now - Klarna Pay Now \* other - Payment Methods other than the above types \* boleto - boleto \* giropay - giropay \* pay_to - PayTo + deprecated: false + enum: + - cash + - check + - bank_transfer + - other + - custom + reference_number: + maxLength: 100 + type: string + description: | + The reference number for this transaction. e.g check number in case of 'check' payments. + deprecated: false + custom_payment_method_id: + maxLength: 50 + type: string + description: | + Identifier of the custom payment method of this transaction. + deprecated: false + id_at_gateway: + maxLength: 100 + type: string + description: | + The id with which this transaction is referred in gateway. + deprecated: false + status: + type: string + description: | + The status of this transaction. \* failure - Transaction failed. Refer the 'error_code' and 'error_text' fields to know the reason for failure \* success - The transaction is successful. \* in_progress - Transaction is being processed by the gateway. This typically happens for [direct debit transactions](https://www.chargebee.com/docs/direct-debit-payments.html) or, in case of cards, refund transactions. Such transactions can take 2-7 days to complete, depending on the gateway and payment method. \* timeout - Transaction failed because of Gateway not accepting the connection. \* needs_attention - Connection with Gateway got terminated abruptly. So, status of this transaction needs to be resolved manually \* voided - The transaction got voided or authorization expired at gateway. + deprecated: false + enum: + - success + - failure + date: + pattern: "^[0-9]{10}$" + type: integer + description: | + Indicates when this transaction occurred. + format: unix-time + deprecated: false + error_code: + maxLength: 100 + type: string + description: | + Error code received from the payment gateway on failure. + deprecated: false + error_text: + maxLength: 65000 + type: string + description: | + Error message received from the payment gateway on failure. + deprecated: false + description: | + Parameters for transaction + deprecated: false + encoding: + transaction: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoice + - transaction + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + transaction: + $ref: '#/components/schemas/Transaction' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/delete: + post: + summary: Delete an invoice + description: "Deletes the specified invoice. Any payments must be [removed](/docs/api/invoices?prod_cat_ver=2#remove_payment_from_an_invoice)\ + \ from the invoice before deleting it. \n**Caution** \n\nAll associated\ + \ [usages](/docs/api/usages?prod_cat_ver=2) are permanently deleted on deleting\ + \ an invoice. If you want to regenerate such an invoice, [add](/docs/api/usages?prod_cat_ver=2#create_a_usage)\ + \ or [bulk import](https://www.chargebee.com/docs/2.0/bulk-operations.html#overview_available-bulk-operations)\ + \ usages before invoice regeneration.\n\n* Any [promotional credits](/docs/api/promotional_credits?prod_cat_ver=2)\ + \ or [credit notes](/docs/api/credit_notes?prod_cat_ver=2) applied to the\ + \ invoice are removed.\n* If an invoice for the current term of a subscription\ + \ is deleted and the subscription is changed later with `proration` enabled,\ + \ no prorated credits are issued.\n" + operationId: delete_an_invoice + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + comment: + maxLength: 300 + type: string + description: | + Reason for deleting the invoice. This comment will be added to the subscription entity if the invoice belongs to a subscription. It is added to the customer entity if the invoice is associated only with a customer. + deprecated: false + claim_credits: + type: boolean + description: | + Indicates whether to put prorated credits back to the subscription or ignore while deleting the invoice. + deprecated: false + default: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoice + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/import_invoice: + post: + summary: Import invoice + description: "Imports an invoice into Chargebee Billing. This endpoint allows\ + \ you to import an invoice from external systems, such as accounting software,\ + \ into Chargebee. \n**Caution: Importing Current-Term Invoices**\n\nTo ensure\ + \ accurate [proration](https://www.chargebee.com/docs/2.0/proration.html#introduction_proration)\ + \ for any changes to the subscription in the current term, only import one\ + \ current term invoice. Chargebee considers only the first imported invoice\ + \ for the current term when calculating proration. If there are multiple invoices\ + \ for the current term in the source system, consolidate them into a single\ + \ invoice before importing it into Chargebee.\n" + operationId: import_invoice + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?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?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - date + - id + - total + type: object + properties: + id: + maxLength: 50 + type: string + description: | + Invoice Number. + deprecated: false + currency_code: + maxLength: 3 + type: string + description: | + The currency code (ISO 4217 format) for the invoice. + deprecated: false + customer_id: + maxLength: 50 + type: string + description: | + Identifier of the customer for which this invoice needs to be created. + deprecated: false + subscription_id: + maxLength: 50 + type: string + description: | + If recurring items are present in line items then subscription id is required. + deprecated: false + po_number: + maxLength: 100 + type: string + description: | + Purchase Order Number for this invoice. + deprecated: false + price_type: + type: string + description: | + The price type of the invoice. \* tax_inclusive - All amounts in the document are inclusive of tax. \* tax_exclusive - All amounts in the document are exclusive of tax. + deprecated: false + default: tax_exclusive + enum: + - tax_exclusive + - tax_inclusive + tax_override_reason: + type: string + description: | + The reason for exempting the invoice from tax. (Applicable only for exempted invoices.). \* export - The customer is from a non-taxable region or the billing address and shipping address are unavailable. \* customer_exempt - The customer is [exempted](customers#customer_taxability) from tax. \* id_exempt - The customer is from a different country than your business and they have a valid VAT number or, the customer is a business entity. (This reason is only applicable when [EU VAT](https://www.chargebee.com/docs/eu-vat.html) or [UK VAT](https://www.chargebee.com/docs/uk-vat.html) is enabled.) + deprecated: false + enum: + - id_exempt + - customer_exempt + - export + vat_number: + maxLength: 20 + type: string + description: | + Vat Number. Required if this invoice is VAT exempted. + deprecated: false + vat_number_prefix: + maxLength: 10 + type: string + description: "An overridden value for the first two characters of\ + \ the [full VAT\nnumber](https://en.wikipedia.org/wiki/VAT_identification_number).\ + \ Only applicable specifically for customers with [billing_address](customers#customer_billing_address)\ + \ `country` as `XI` (which is **United Kingdom - Northern Ireland**\ + \ ). \n\nWhen you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or have [manually\nenabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, you have the option of setting [billing_address](customers#customer_billing_address)\ + \ `country` as `XI`. That's the code for **United Kingdom - Northern\n\ + Ireland** . The first two characters of the VAT number in such\ + \ a case is `XI` by default. However, if the VAT number was registered\ + \ in UK, the value should be `GB`. Set `vat_number_prefix` to\ + \ `GB` for such cases.\n" + deprecated: false + date: + pattern: "^[0-9]{10}$" + type: integer + description: | + Date when invoice raised. + format: unix-time + deprecated: false + total: + minimum: 0 + type: integer + description: | + Invoice total amount. + format: int64 + deprecated: false + round_off: + maximum: 99 + minimum: -99 + type: integer + description: | + Round off amount. + format: int64 + deprecated: false + status: + type: string + description: "Current status of this invoice. \\* not_paid - Indicates\ + \ the payment is not made and all attempts to collect is failed.\ + \ \\* voided - Indicates a voided invoice. \\* paid - Indicates\ + \ a paid invoice. \\* posted - Indicates the payment is not yet\ + \ collected and will be in this state till the due date to indicate\ + \ the due period \\* pending - \nThe [invoice](/docs/api/invoices?prod_cat_ver=2#invoice_status)\ + \ is yet to be closed (sent for payment collection). An invoice\ + \ is generated with this `status` when it has line items that\ + \ belong to items that are `metered` or when the `subscription.create_pending_invoices`attribute\ + \ is set to `true`. \nThe [invoice](/docs/api/invoices?prod_cat_ver=1#invoice_status)\ + \ is yet to be closed (sent for payment collection). All invoices\ + \ are generated with this `status` when [Metered Billing](https://www.chargebee.com/docs/1.0/metered_billing.html)\ + \ is enabled for the site. \\* payment_due - Indicates the payment\ + \ is not yet collected and is being retried as per retry settings.\n" + deprecated: false + enum: + - paid + - posted + - payment_due + - not_paid + - voided + - pending + voided_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + Timestamp indicating the date \& time this invoice got voided. + format: unix-time + deprecated: false + void_reason_code: + maxLength: 100 + type: string + description: | + Reason code for voiding the invoice. Select from a list of reason codes set in the Chargebee app in **Settings \> Configure Chargebee \> Reason Codes \> Invoices \> Void invoice**. Must be passed if set as mandatory in the app. The codes are case-sensitive. + deprecated: false + is_written_off: + type: boolean + description: | + If is_written_off is true then the invoice is written off. + deprecated: false + default: false + write_off_amount: + minimum: 0 + type: integer + description: | + Amount written off against this invoice. If this value is not present then the due amount of the invoice will be written off. + format: int64 + deprecated: false + default: 0 + write_off_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The date on which the write_off invoice has occurred. This is a mandatory field if is_written_off is true. The same date reflects on the created credit note. + format: unix-time + deprecated: false + due_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + Invoice Due Date. + format: unix-time + deprecated: false + net_term_days: + type: integer + description: | + Invoice net term days. + format: int32 + deprecated: false + default: 0 + has_advance_charges: + type: boolean + description: | + Boolean indicating any advance charge is present in this invoice. + deprecated: false + default: false + use_for_proration: + type: boolean + description: | + If the invoice falls within the subscription current term will be used for proration. + deprecated: false + default: false + credit_note: + type: object + properties: + id: + maxLength: 50 + type: string + description: | + A unique identifier for the credit note. This is a mandatory field if is_written_off is true. + deprecated: false + description: | + Parameters for credit_note + deprecated: false + billing_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the billing contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the billing contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for billing_address + deprecated: false + shipping_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for shipping_address + deprecated: false + line_items: + required: + - description + type: object + properties: + id: + type: array + description: | + Uniquely identifies a line_item + items: + maxLength: 40 + type: string + deprecated: false + date_from: + type: array + description: | + Start date of this line item. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + date_to: + type: array + description: | + End date of this line item. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + subscription_id: + type: array + description: | + A unique identifier for the subscription this line item belongs to. + items: + maxLength: 50 + type: string + deprecated: false + description: + type: array + description: | + Description for this line item + items: + maxLength: 250 + type: string + deprecated: false + unit_amount: + type: array + description: | + Unit amount of the line item. + items: + type: integer + format: int64 + deprecated: false + quantity: + type: array + description: "[Quantity of the recurring item](/docs/api/invoices?prod_cat_ver=2#invoice_line_items_quantity)\ + \ which is represented by this line item. For `metered` line\ + \ items, this value is updated from [usages](/docs/api/usages)\ + \ once when the invoice is generated as `pending` and finally\ + \ when the invoice is [closed](/docs/api/invoices#close_a_pending_invoice).\ + \ \n[Quantity of the recurring item](/docs/api/invoices?prod_cat_ver=1#invoice_line_items_quantity)\ + \ which is represented by this line item.\n" + items: + type: integer + format: int32 + deprecated: false + default: 1 + amount: + type: array + description: | + Total amount of this lineitem. Not required if the line_items\[unit_amount\] param is passed + items: + type: integer + format: int64 + deprecated: false + unit_amount_in_decimal: + type: array + description: | + The decimal representation of the unit amount of the `line_item`. The value is in major units of the currency. Returned when the `line_item` is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units ) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of this line_item. Returned when the `line_item` is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units ) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + amount_in_decimal: + type: array + description: | + The decimal representation of the amount for the `line_item`, in major units of the currency. Typically equals to `unit_amount_in_decimal` x `quantity_in_decimal`. Returned when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units ) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + entity_type: + type: array + items: + type: string + description: | + Specifies the modelled entity this line item is based on. \* addon - Indicates that this lineitem is based on 'Addon' entity. The 'entity_id' attribute specifies the [addon](/docs/api/addons#addon_attributes) id \* plan - Indicates that this lineitem is based on 'Plan' entity. The 'entity_id' attribute specifies the [plan](/docs/api/plans#plan_attributes) id \* plan_item_price - Indicates that this line item is based on plan Item Price \* addon_item_price - Indicates that this line item is based on addon Item Price \* charge_item_price - Indicates that this line item is based on charge Item Price \* adhoc - Indicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case \* plan_setup - Indicates that this lineitem is based on 'Plan Setup' charge. The 'entity_id' attribute specifies the [plan](/docs/api/plans#plan_attributes) id + deprecated: false + enum: + - adhoc + - plan_item_price + - addon_item_price + - charge_item_price + entity_id: + type: array + description: | + The identifier of the modelled entity this line item is based on. Will be null for 'adhoc' entity type + items: + maxLength: 100 + type: string + deprecated: false + item_level_discount1_entity_id: + type: array + description: | + First item level discount entity id + items: + maxLength: 100 + type: string + deprecated: false + item_level_discount1_amount: + type: array + description: | + First item level discount amount + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + item_level_discount2_entity_id: + type: array + description: | + Second item level discount entity id + items: + maxLength: 100 + type: string + deprecated: false + item_level_discount2_amount: + type: array + description: | + Second item level discount amount + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + tax1_name: + type: array + description: | + First tax name + items: + maxLength: 50 + type: string + deprecated: false + tax1_amount: + type: array + description: | + First tax amount + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + tax2_name: + type: array + description: | + Second tax name + items: + maxLength: 50 + type: string + deprecated: false + tax2_amount: + type: array + description: | + Second tax amount + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + tax3_name: + type: array + description: | + Third tax name + items: + maxLength: 50 + type: string + deprecated: false + tax3_amount: + type: array + description: | + Third tax amount + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + tax4_name: + type: array + description: | + Fourth tax name + items: + maxLength: 50 + type: string + deprecated: false + tax4_amount: + type: array + description: | + Fourth tax amount + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + tax5_name: + type: array + description: | + Fifth tax name + items: + maxLength: 50 + type: string + deprecated: false + tax5_amount: + type: array + description: | + Fifth tax amount + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + tax6_name: + type: array + description: | + Sixth tax name + items: + maxLength: 50 + type: string + deprecated: false + tax6_amount: + type: array + description: | + Sixth tax amount + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + tax7_name: + type: array + description: | + Seventh tax name + items: + maxLength: 50 + type: string + deprecated: false + tax7_amount: + type: array + description: | + Seventh tax amount + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + tax8_name: + type: array + description: | + Eighth tax name + items: + maxLength: 50 + type: string + deprecated: false + tax8_amount: + type: array + description: | + Eighth tax amount + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + tax9_name: + type: array + description: | + Ninth tax name + items: + maxLength: 50 + type: string + deprecated: false + tax9_amount: + type: array + description: | + Ninth tax amount + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + tax10_name: + type: array + description: | + Tenth tax name + items: + maxLength: 50 + type: string + deprecated: false + tax10_amount: + type: array + description: | + Tenth tax amount + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + description: | + Parameters for line_items + deprecated: false + payment_reference_numbers: + required: + - number + - type + type: object + properties: + id: + type: array + description: | + If `id` is not provided then our system will automatically generate a unique id. + items: + maxLength: 40 + type: string + deprecated: false + type: + type: array + items: + type: string + description: | + This attribute helps `type` field in the API, specifies how to reconcile offline payments, and generate `payment_reference_number` on invoices based on country-specific rules. Setting the `type` field generates `payment_reference_number` for the respective country and includes them on the invoice for correct reconciliation. \* kid - The KID number (kundeidentifikasjon) in Norway is an abbreviation for "Customer identification". It is used to associate payments with the customer and invoice. \* fik - Denmark based number calculated using recursive MOD 10 algorithm. \* frn - The reference number printed on invoices in Finland is utilized by buyers for payment via bank transfer, facilitating the association of payments with invoices. \* ocr - A OCR-based payment, contains an OCR reference, which is used to identify the vendor and the purchase document in connection with a payment. Swedish reference number can contain customer ID and/or invoice number to identify customer and invoice. + deprecated: false + enum: + - kid + - ocr + - frn + - fik + - swiss_reference + number: + type: array + description: | + If you have already generated a `payment_reference_number` in another system, you can provide it in this field. This number will then be made available to you both in PDF format and via the `/api/v2/invoices/payment_reference_numbers` API. + items: + maxLength: 100 + type: string + deprecated: false + description: | + Parameters for payment_reference_numbers + deprecated: false + line_item_tiers: + required: + - line_item_id + type: object + properties: + line_item_id: + type: array + description: | + Uniquely identifies a line_item + items: + maxLength: 40 + type: string + deprecated: false + starting_unit: + type: array + description: | + The lower limit of a range of units for the tier + items: + minimum: 0 + type: integer + format: int32 + deprecated: false + ending_unit: + type: array + description: | + The upper limit of a range of units for the tier + items: + type: integer + format: int32 + deprecated: false + quantity_used: + type: array + description: | + The number of units purchased in a range. + items: + minimum: 0 + type: integer + format: int32 + deprecated: false + unit_amount: + type: array + description: | + The price of the tier if the charge model is a `stairtstep` pricing , or the price of each unit in the tier if the charge model is `tiered`/`volume` pricing. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + starting_unit_in_decimal: + type: array + description: | + The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal` of the next lower tier. Returned only when the `line_items.pricing_model` is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units ) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + ending_unit_in_decimal: + type: array + description: | + The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal` of the next higher tier. Returned only when the `line_items.pricing_model` is `tiered`, `volume` or stairstep and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units ) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + quantity_used_in_decimal: + type: array + description: | + The decimal representation of the quantity purchased from this tier. Returned when the `line_item` is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units ) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + unit_amount_in_decimal: + type: array + description: | + The decimal representation of the per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. When the `pricing_model` is `stairstep`, it is the decimal representation of the total price for `line_item`. The value is in major units of the currency. Returned when the `line_item` is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units ) is enabled. + items: + maxLength: 40 + type: string + deprecated: false + description: | + Parameters for line_item_tiers + deprecated: false + discounts: + required: + - amount + - entity_type + type: object + properties: + line_item_id: + type: array + description: | + The unique id of the line item that this deduction is for. Is required when `discounts[entity_type]` is `item_level_coupon` or `document_level_coupon`. + items: + maxLength: 40 + type: string + deprecated: false + entity_type: + type: array + items: + type: string + description: | + The type of deduction and the amount to which it is applied. \* prorated_credits - The deduction is due to a legacy adjustment credit applied to the invoice. The `entity_id` is `null` in this case. The legacy credits feature is superseded by [adjustment_credit_notes](/docs/api/invoices?prod_cat_ver=2#invoice_adjustment_credit_notes). \* item_level_coupon - The deduction is due to a coupon applied to line item. The coupon `id` is passed as `entity_id`. \* item_level_discount - The deduction is due to a [discount](/docs/api/discounts?prod_cat_ver=2) applied to a line item of the invoice. The discount `id` is available as the `entity_id`. \* document_level_coupon - The deduction is due to a coupon applied to the invoice `sub_total`. The coupon id is passed as `entity_id`. \* promotional_credits - The deduction is due to a [promotional credit](/docs/api/promotional_credits?prod_cat_ver=2) applied to the invoice. \* document_level_discount - The deduction is due to a [discount](/docs/api/discounts?prod_cat_ver=2) applied to the invoice `sub_total`. The discount `id` is available as the `entity_id`. + deprecated: false + enum: + - item_level_coupon + - document_level_coupon + - promotional_credits + - item_level_discount + - document_level_discount + entity_id: + type: array + description: | + When the deduction is due to a `coupon`, then this is the `id` of the coupon. Is required when `discounts[entity_type]` is `item_level_coupon` or `document_level_coupon`. + items: + maxLength: 100 + type: string + deprecated: false + description: + type: array + description: | + Description for this deduction. + items: + maxLength: 250 + type: string + deprecated: false + amount: + type: array + description: | + The amount deducted. The format of this value depends on the [kind of currency](/docs/api?prod_cat_ver=2#currencies). + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + description: | + Parameters for discounts + deprecated: false + taxes: + required: + - name + - rate + type: object + properties: + name: + type: array + description: | + The name of the tax applied + items: + maxLength: 100 + type: string + deprecated: false + rate: + type: array + description: | + The rate of tax used to calculate tax amount + items: + maximum: 100 + minimum: 0 + type: number + format: double + deprecated: false + default: 0 + amount: + type: array + description: | + Total tax amount charged for this invoice + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + description: + type: array + description: | + Description of tax + items: + maxLength: 50 + type: string + deprecated: false + juris_type: + type: array + items: + type: string + description: | + The type of tax jurisdiction \* country - The tax jurisdiction is a country \* special - Special tax jurisdiction. \* state - The tax jurisdiction is a state \* city - The tax jurisdiction is a city \* other - Jurisdictions other than the ones listed above. \* unincorporated - Combined tax of state and county. \* federal - The tax jurisdiction is a federal \* county - The tax jurisdiction is a county + deprecated: false + default: other + enum: + - country + - federal + - state + - county + - city + - special + - unincorporated + - other + juris_name: + type: array + description: | + The name of the tax jurisdiction + items: + maxLength: 250 + type: string + deprecated: false + juris_code: + type: array + description: | + The tax jurisdiction code + items: + maxLength: 250 + type: string + deprecated: false + description: | + Parameters for taxes + deprecated: false + payments: + required: + - amount + - payment_method + type: object + properties: + amount: + type: array + description: | + Payment made for this invoice + items: + minimum: 1 + type: integer + format: int64 + deprecated: false + payment_method: + type: array + items: + type: string + description: | + Mode of payment \* faster_payments - Faster Payments \* sepa_credit - SEPA Credit \* chargeback - Only applicable for a transaction of [type](transactions#transaction_type) = `refund`. This value is set by Chargebee when an automated [chargeback](https://www.chargebee.com/docs/chargeback.html#chargeback-process) occurs. You can also set this explicitly when [recording a refund](transactions#record_an_offline_refund). \* google_pay - Google Pay \* check - Check \* giropay - giropay \* wechat_pay - WeChat Pay \* pay_to - PayTo \* alipay - Alipay \* sofort - Sofort \* dotpay - Dotpay \* bank_transfer - Bank Transfer \* venmo - Venmo \* ach_credit - ACH Credit \* ideal - IDEAL \* klarna_pay_now - Klarna Pay Now \* custom - Custom \* upi - upi \* sepa_instant_transfer - Sepa Instant Transfer \* boleto - boleto \* apple_pay - Apple Pay \* amazon_payments - Amazon Payments \* direct_debit - Direct Debit \* bancontact - Bancontact \* other - Payment Methods other than the above types \* cash - Cash \* unionpay - Unionpay \* automated_bank_transfer - Automated Bank Transfer \* paypal_express_checkout - Paypal Express Checkout \* netbanking_emandates - netbanking_emandates \* card - Card + deprecated: false + enum: + - cash + - check + - bank_transfer + - other + - custom + date: + type: array + description: | + Payment date + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + reference_number: + type: array + description: | + Reference number for this payment + items: + maxLength: 100 + minLength: 1 + type: string + deprecated: false + description: | + Parameters for payments + deprecated: false + notes: + type: object + properties: + entity_type: + type: array + items: + type: string + description: | + Type of entity to which the note belongs. \* subscription - Entity that represents a subscription of customer. \* plan_item_price - Indicates that this line item is based on plan Item Price \* customer - Entity that represents a customer. \* plan - Entity that represents a plan. \* coupon - Entity that represents a coupon. \* tax - The note is configured as part of the [tax configuration](https://www.chargebee.com/docs/tax.html) in Chargebee Billing. \* addon_item_price - Indicates that this line item is based on addon Item Price \* charge_item_price - Indicates that this line item is based on charge Item Price \* addon - Entity that represents an addon. + deprecated: false + enum: + - coupon + - plan_item_price + - addon_item_price + - charge_item_price + entity_id: + type: array + description: | + Id of the mentioned entity type + items: + maxLength: 50 + type: string + deprecated: false + note: + type: array + description: | + Actual note. + items: + maxLength: 2000 + type: string + deprecated: false + description: | + Parameters for notes + deprecated: false + encoding: + billing_address: + style: deepObject + explode: true + credit_note: + style: deepObject + explode: true + discounts: + style: deepObject + explode: true + line_item_tiers: + style: deepObject + explode: true + line_items: + style: deepObject + explode: true + notes: + style: deepObject + explode: true + payment_reference_numbers: + style: deepObject + explode: true + payments: + style: deepObject + explode: true + shipping_address: + style: deepObject + explode: true + taxes: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoice + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + credit_note: + $ref: '#/components/schemas/CreditNote' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/record_tax_withheld: + post: + summary: Record tax withheld for an invoice + description: | + Records [tax_withheld](/docs/api/tax_withheld) by the customer against the invoice specified. This operation is allowed only when all of the following conditions are true: + + * Tax Amount Withheld is enabled. + * The `invoice` does not have a `linked_taxes_withheld` record associated with it already. + * `invoice.amount_due` is greater than zero. + * `invoice.status` is one of the following: `payment_due`, `not_paid`, or `posted`. + operationId: record_tax_withheld_for_an_invoice + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[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]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + tax_withheld: + required: + - amount + type: object + properties: + amount: + minimum: 1 + type: integer + description: | + The amount withheld by the customer as tax from the invoice. This must not exceed [invoice.amount_due](/docs/api/invoices#invoice_amount_due). The unit depends on the [type of currency](/docs/api#md_disabled). + format: int64 + deprecated: false + reference_number: + maxLength: 100 + type: string + description: | + A unique external reference number for the tax withheld. Typically, this is the reference number used by the system you are integrating the API with. Depending on your integration, this could be the reference number issued by the taxation authority to identify the customer or the specific tax transaction. + deprecated: false + date: + pattern: "^[0-9]{10}$" + type: integer + description: | + Date or time associated with this tax amount withheld. The default value is the time of invoking this operation. + format: unix-time + deprecated: false + description: + maxLength: 65000 + type: string + description: | + The description for this tax withheld. + deprecated: false + description: | + Parameters for tax_withheld + deprecated: false + encoding: + tax_withheld: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoice + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/resend_einvoice: + post: + summary: Resend failed einvoice in invoices + description: | + Resend failed einvoice of an invoice to the customer using this API. + operationId: resend_failed_einvoice_in_invoices + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a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]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoice + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/remove_tax_withheld: + post: + summary: Remove tax withheld for an invoice + description: | + Removes a [linked_taxes_withheld](/docs/api/invoices#invoice_linked_taxes_withheld) record from the `invoice` specified. This operation is allowed only when all of the following conditions are true: + + * [invoice.status](/docs/api/invoices#invoice_status) is one of the following: `payment_due`, `not_paid`, or `posted`. + * There are no [adjustment_credit_notes](/docs/api/invoices#invoice_adjustment_credit_notes) associated with the invoice. + * There are no [issued_credit_notes](/docs/api/invoices#invoice_issued_credit_notes) associated with the invoice. + operationId: remove_tax_withheld_for_an_invoice + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?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9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + tax_withheld: + required: + - id + type: object + properties: + id: + maxLength: 40 + type: string + description: | + An auto-generated unique identifier for the tax withheld. The value starts with the prefix `tax_wh_`. For example, `tax_wh_16BdDXSlbu4uV1Ee6`. + deprecated: false + description: | + Parameters for tax_withheld + deprecated: false + encoding: + tax_withheld: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoice + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/payment_reference_numbers: + get: + summary: List payment reference numbers + description: | + This API endpoint allows users to retrieve the payment reference numbers (PRNs) associated with an invoice. Only one PRN is allowed per payment type. You can use the `invoice_id` or the `payment_reference_number[number]` to retrieve the PRN. + operationId: list_payment_reference_numbers + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([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-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: id + in: query + description: "optional, string filter
An\ + \ unique identifier for the invoice serves that links the invoice to the\ + \ corresponding payment reference number (PRN).
Note: To retrieve\ + \ the PRN, the API requires either the invoice ID or the payment reference\ + \ number to be provided by the user. If both values are missing, an error\ + \ will be returned by the API.
Supported operators : is, is_not,\ + \ starts_with, in, not_in

Example id[is] = \"old_inv_001\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + is: + minLength: 1 + type: string + example: old_inv_001 + deprecated: false + - name: payment_reference_number + in: query + description: Parameters for payment_reference_number + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + number: + type: object + properties: + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + is: + minLength: 1 + type: string + description: | + This parameter is used to identify the PRN in the system and retrieve its corresponding payment information. \*\*Note\*\*: To retrieve the PRN, the API requires either the invoice ID or the payment reference number to be provided by the user. If both values are missing, an error will be returned by the API. + example: "001234" + deprecated: false + deprecated: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - payment_reference_number + type: object + properties: + payment_reference_number: + $ref: '#/components/schemas/PaymentReferenceNumber' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/collect_payment: + post: + summary: Collect payment for an invoice + description: | + **Important:** + + * Storing card after successful 3DS completion is not supported in this API. Use [create using Payment Intent API](https://apidocs.chargebee.com/docs/api/payment_sources#create_using_payment_intent) under Payment source to store the card after successful 3DS flow completion. + * This endpoint returns an error if a payment is initiated for an invoice with a [status](https://apidocs.chargebee.com/docs/api/invoices?prod_cat_ver=2#invoice_status) of `payment_due` associated with the `app_store` and `play_store` [channels](https://apidocs.chargebee.com/docs/api/invoices?prod_cat_ver=2#invoice_channel). + + This API is used to collect payments for `payment_due` and `not_paid invoices`. If no payment methods are present for the customer or if the payment is unsuccessful, the corresponding error will be thrown. + + Pass `authorization_transaction_id` to capture the already blocked funds to collect payments. Note that if the invoice due amount is greater than the authorized amount, the invoice status is returned as `payment_due`. + operationId: collect_payment_for_an_invoice + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[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1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + amount: + minimum: 1 + type: integer + description: | + Amount to be collected. If this parameter is not passed then the entire amount due will be collected. + format: int64 + deprecated: false + authorization_transaction_id: + maxLength: 40 + type: string + description: | + Authorization transaction to be captured. + deprecated: false + payment_source_id: + maxLength: 40 + type: string + description: | + Payment source to be used for this payment. + deprecated: false + comment: + maxLength: 300 + type: string + description: | + An internal [comment](./comments) to be added for this operation, to the invoice. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](./hosted_pages) or any document such as the [Invoice PDF](./invoices#retrieve_invoice_as_pdf). + deprecated: false + payment_initiator: + type: string + description: | + The type of initiator to be used for the payment request triggered by this operation. \* merchant - Pass this value to indicate that the request is initiated by the merchant \* customer - Pass this value to indicate that the request is initiated by the customer + deprecated: false + enum: + - customer + - merchant + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoice + - transaction + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + transaction: + $ref: '#/components/schemas/Transaction' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/sync_usages: + post: + summary: Sync usages + description: | + Updates the [`quantity`](/docs/api/invoices#invoice_line_items_quantity) for `metered` [`line_items`](/docs/api/invoices#invoice_line_items) of an invoice to reflect the latest [usage](https://apidocs.chargebee.com/docs/api/usages) data. + + **Note:** This operation is done automatically while [closing](https://apidocs.chargebee.com/docs/api/invoices#close_a_pending_invoice) the invoice. + operationId: sync_usages + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(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:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoice + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/refund: + post: + summary: Refund an invoice + description: | + Refunds the invoice. The [refund](https://www.chargebee.com/docs/refunds.html) request is processed via the payment gateway originally used to charge the customer. You can choose to either make a full refund for the entire amount or make many partial refunds until you reach the total amount charged for the invoice. The API returns an error if an attempt is made to: + + * Refund an offline invoice. For such invoices, use the [Record refund API](/docs/api/invoices#record_refund_for_an_invoice). + * Refund a fully refunded invoice. + + If the refund transaction succeeds, a `credit_note` capturing this refund detail is created for the invoice. + operationId: refund_an_invoice + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]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4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + refund_amount: + minimum: 1 + type: integer + description: | + The amount to be refunded. If not specified, the entire refundable amount for this invoice is refunded. The refundable amount is the total amount paid via online `transaction`s, and not already refunded. **Note:** Any [linked_taxes_withheld](/docs/api/invoices#invoice_linked_taxes_withheld) associated with the invoice cannot be refunded via this operation. + format: int64 + deprecated: false + comment: + maxLength: 300 + type: string + description: | + Comment, if any, on the refund. + deprecated: false + customer_notes: + maxLength: 2000 + type: string + description: | + The Customer Notes to be filled in the Credit Notes created to capture this refund detail. + deprecated: false + credit_note: + type: object + properties: + reason_code: + type: string + description: | + The reason for issuing this Credit Note. The following reason codes are supported now\[Deprecated; use the [create_reason_code](/docs/api/credit_notes#credit_note_create_reason_code) parameter instead\] \* product_unsatisfactory - Product Unsatisfactory \* chargeback - Can be set when you are recording your customer Chargebacks \* service_unsatisfactory - Service Unsatisfactory \* write_off - This reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off) operation. \* subscription_change - This reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html) is enabled \* fraudulent - FRAUDULENT \* other - Can be set when none of the above reason codes are applicable \* subscription_pause - This reason will be automatically set to credit notes created during pause/resume subscription operation. \* waiver - Waiver \* order_cancellation - Order Cancellation \* order_change - Order Change \* subscription_cancellation - This reason will be set automatically for Credit Notes created during cancel subscription operation + deprecated: false + enum: + - product_unsatisfactory + - service_unsatisfactory + - order_change + - order_cancellation + - waiver + - other + create_reason_code: + maxLength: 100 + type: string + description: | + Reason code for creating the credit note. Must be one from a list of reason codes set in the Chargebee app in Settings \> Configure Chargebee \> Reason Codes \> Credit Notes \> Create Credit Note. The codes are case-sensitive + deprecated: false + description: | + Parameters for credit_note + deprecated: false + encoding: + credit_note: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoice + - transaction + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + transaction: + $ref: '#/components/schemas/Transaction' + credit_note: + $ref: '#/components/schemas/CreditNote' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/record_refund: + post: + summary: Record refund for an invoice + description: "Refunds the invoice. The refund is provided against the following\ + \ in order of precedence:\n\n* Offline [linked_payments](/docs/api/invoices#invoice_linked_payments)\n\ + * Any [linked_taxes_withheld](/docs/api/invoices#invoice_linked_taxes_withheld)\n\ + * Online [linked_payments](/docs/api/invoices#invoice_linked_payments)\n\n\ + **Example**\n\nConsider an invoice with the following payments and tax withheld.\n\ + \n* Offline payments: $30\n* Online payments: $20\n* Tax withheld: $5\n\n\ + When recording a refund worth $40, the refund amount is split as follows:\n\ + \n* Refund against offline payments: $30\n* Refund against tax withheld: $5\n\ + * Refund against online payments: $5\n\nFor payments made via online transactions,\ + \ the [refund](https://www.chargebee.com/docs/refunds.html) request is processed\ + \ via the payment gateway originally used to charge the customer. \n**Tip**\n\ + \nIf the order of precendence described above does not work for your use case,\ + \ and you want to provide a refund against online `linked_payments` first,\ + \ use the [Refund an invoice API](/docs/api/invoices#refund_an_invoice).\n" + operationId: record_refund_for_an_invoice + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))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,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + comment: + maxLength: 65000 + type: string + description: | + Remarks, if any, on the refund. + deprecated: false + customer_notes: + maxLength: 2000 + type: string + description: | + The Customer Notes to be filled in the Credit Notes created to capture this refund detail. + deprecated: false + transaction: + required: + - date + - payment_method + type: object + properties: + amount: + minimum: 1 + type: integer + description: | + The amount to be refunded (for online payments) or recorded as refunded (for offline payments). If not specified, the entire refundable amount for this invoice is refunded. The refundable amount is the total amount paid (and not already refunded) for the invoice. **Note:** Any [linked_taxes_withheld](/docs/api/invoices#invoice_linked_taxes_withheld) associated with the invoice can also be recorded as refunded via this operation. + format: int64 + deprecated: false + payment_method: + type: string + description: | + The payment method of this transaction \* cash - Cash \* alipay - Alipay \* sofort - Sofort \* direct_debit - Direct Debit \* netbanking_emandates - netbanking_emandates \* klarna_pay_now - Klarna Pay Now \* paypal_express_checkout - Paypal Express Checkout \* automated_bank_transfer - Automated Bank Transfer \* venmo - Venmo \* bancontact - Bancontact \* custom - Custom \* ideal - IDEAL \* check - Check \* upi - upi \* sepa_instant_transfer - Sepa Instant Transfer \* sepa_credit - SEPA Credit \* ach_credit - ACH Credit \* faster_payments - Faster Payments \* bank_transfer - Bank Transfer \* chargeback - Only applicable for a transaction of [type](transactions#transaction_type) = `refund`. This value is set by Chargebee when an automated [chargeback](https://www.chargebee.com/docs/chargeback.html#chargeback-process) occurs. You can also set this explicitly when [recording a refund](transactions#record_an_offline_refund). \* unionpay - Unionpay \* apple_pay - Apple Pay \* dotpay - Dotpay \* amazon_payments - Amazon Payments \* wechat_pay - WeChat Pay \* google_pay - Google Pay \* card - Card \* other - Payment Methods other than the above types \* boleto - boleto \* giropay - giropay \* pay_to - PayTo + deprecated: false + enum: + - cash + - check + - chargeback + - bank_transfer + - other + - custom + reference_number: + maxLength: 100 + type: string + description: | + The reference number for this transaction. For example, the check number when [payment_method](transactions#transaction_payment_method) = `check`. + deprecated: false + custom_payment_method_id: + maxLength: 50 + type: string + description: | + Identifier of the custom payment method of this transaction. + deprecated: false + date: + pattern: "^[0-9]{10}$" + type: integer + description: | + Indicates when this transaction occurred. + format: unix-time + deprecated: false + description: | + Parameters for transaction + deprecated: false + credit_note: + type: object + properties: + reason_code: + type: string + description: | + The reason for issuing this Credit Note. The following reason codes are supported now\[Deprecated; use the [create_reason_code](/docs/api/credit_notes#credit_note_create_reason_code) parameter instead\] \* service_unsatisfactory - Service Unsatisfactory \* subscription_pause - This reason will be automatically set to credit notes created during pause/resume subscription operation. \* order_cancellation - Order Cancellation \* subscription_cancellation - This reason will be set automatically for Credit Notes created during cancel subscription operation \* product_unsatisfactory - Product Unsatisfactory \* subscription_change - This reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html) is enabled \* other - Can be set when none of the above reason codes are applicable \* order_change - Order Change \* chargeback - Can be set when you are recording your customer Chargebacks \* write_off - This reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off) operation. \* fraudulent - FRAUDULENT \* waiver - Waiver + deprecated: false + enum: + - chargeback + - product_unsatisfactory + - service_unsatisfactory + - order_change + - order_cancellation + - waiver + - other + create_reason_code: + maxLength: 100 + type: string + description: | + Reason code for creating the credit note. Must be one from a list of reason codes set in the Chargebee app in Settings \> Configure Chargebee \> Reason Codes \> Credit Notes \> Create Credit Note. The codes are case-sensitive + deprecated: false + description: | + Parameters for credit_note + deprecated: false + encoding: + credit_note: + style: deepObject + explode: true + transaction: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoice + type: object + properties: + invoice: + $ref: '#/components/schemas/Invoice' + transaction: + $ref: '#/components/schemas/Transaction' + credit_note: + $ref: '#/components/schemas/CreditNote' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/pdf: + post: + summary: Retrieve Invoice as PDF + description: | + Gets the invoice as PDF. The returned URL is secure and allows download. The URL will expire in 60 minutes. + + #### Related Tutorial + + * [Check out customer portal tutorial on how to download invoice as PDF.](//www.chargebee.com/tutorials/customer-portal-sample.html#downloading_invoices_as_pdf) + operationId: retrieve_invoice_as_pdf + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|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?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + disposition_type: + type: string + description: | + Determines the pdf should be rendered as inline or attachment in the browser. \* attachment - PDF is rendered as attachment in the browser \* inline - PDF is rendered as inline in the browser + deprecated: false + default: attachment + enum: + - attachment + - inline + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - download + type: object + properties: + download: + $ref: '#/components/schemas/Download' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/download_einvoice: + get: + summary: Download e-invoice + description: "Download the e-invoice in both XML and PDF formats. The response\ + \ consists of a `download` object for each format. The XML format follows\ + \ the [structure as per Peppol BIS Billing v3.0](https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-invoice/tree/).\ + \ \n**Note**\n\n* You can only download e-invoices when their `status` is\ + \ `success`.\n* There are some cases in which the PDF is not available for\ + \ download. In such cases, you can obtain it from the XML by decoding the\ + \ value for [cbc:EmbeddedDocumentBinaryObject](https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-invoice/cac-AdditionalDocumentReference/cac-Attachment/cbc-EmbeddedDocumentBinaryObject/),\ + \ which is the Base64-encoded version of the PDF.\n" + operationId: download_e-invoice + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|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-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - downloads + type: object + properties: + downloads: + type: array + items: + $ref: '#/components/schemas/Download' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /credit_notes/{credit-note-id}/void: + post: + summary: Void a credit note + description: | + Use this API to [void a credit note.](https://www.chargebee.com/docs/credit-notes.html#voiding-or-deleting-a-credit-note) A voided credit is a null entity and cannot be used again. A credit note which has already been voided or refunded cannot be voided. An error message will be displayed when you render such credit notes void. + + **Note:** When adjustment credit notes are voided, the associated invoice will reflect as NOT PAID, and the amount in the invoice will be recalculated to reflect the amount after considering the voided credit note. + operationId: void_a_credit_note + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]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9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: credit-note-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + comment: + maxLength: 300 + type: string + description: | + Reason for voiding credit note. This comment will be added to the credit note. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - credit_note + type: object + properties: + credit_note: + $ref: '#/components/schemas/CreditNote' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /credit_notes/{credit-note-id}/refund: + post: + summary: Refund a credit note + description: | + Refunds a ([refundable](https://www.chargebee.com/docs/credit-notes.html#types-of-credit-notes_refundable-credit-note)) credit note to the [payment source](/docs/api/payment_sources) associated with the [transaction](/docs/api/transactions). Any [linked_tax_withheld_refunds](/docs/api/credit_notes#credit_note_linked_tax_withheld_refunds) recorded against the credit note are not refunded. + operationId: refund_a_credit_note + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):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:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: credit-note-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + refund_amount: + minimum: 1 + type: integer + description: | + The amount to be refunded. If not specified, the entire [refundable amount](/docs/api/credit_notes#credit_note_amount_available) for this `credit_note` is refunded. **Note:** Any [linked_tax_withheld_refunds](/docs/api/credit_notes#credit_note_linked_tax_withheld_refunds) associated with the `credit_note` cannot be refunded via this operation. + format: int64 + deprecated: false + customer_notes: + maxLength: 2000 + type: string + description: | + A note to be added for this operation, to the credit note. This note is displayed on customer-facing documents such as the [Credit Note PDF](./credit_notes#retrieve_credit_note_as_pdf). + deprecated: false + refund_reason_code: + maxLength: 100 + type: string + description: | + Reason code for the refund. Must be one from a list of reason codes set in the Chargebee app in **Settings \> Configure Chargebee \> Reason Codes \> Credit Notes \> Refund Credit Note**. Must be passed if set as mandatory in the app. The codes are case-sensitive. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - credit_note + - transaction + type: object + properties: + credit_note: + $ref: '#/components/schemas/CreditNote' + transaction: + $ref: '#/components/schemas/Transaction' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /credit_notes: + get: + summary: List credit notes + description: | + Lists all the Credit Notes. + operationId: list_credit_notes + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(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fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: include_deleted + in: query + description: "If set to true, includes the deleted resources in the response.\ + \ For the deleted resources in the response, the 'deleted'\ + \ attribute will be 'true'." + required: false + style: form + explode: true + schema: + type: boolean + default: false + - name: id + in: query + description: "optional, string filter
Credit-note\ + \ id.
Supported operators : is, is_not, starts_with, in, not_in

Example\ + \ id[is] = \"CN_123\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: CN_123 + deprecated: false + - name: customer_id + in: query + description: "optional, string filter
The\ + \ identifier of the customer this Credit Note belongs to.
Supported\ + \ operators : is, is_not, starts_with, in, not_in

Example\ + \ customer_id[is] = \"4gmiXbsjdm\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: 4gmiXbsjdm + deprecated: false + - name: subscription_id + in: query + description: "optional, string filter
To\ + \ filter based on subscription_id.
NOTE: Not to be used if consolidated\ + \ invoicing feature is enabled.
Supported operators : is,\ + \ is_not, starts_with, is_present, in, not_in

Example subscription_id[is] = \"4gmiXbsjdm\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: 4gmiXbsjdm + deprecated: false + - name: reference_invoice_id + in: query + description: "optional, string filter
The\ + \ identifier of the invoice against which this Credit Note is issued.
Supported\ + \ operators : is, is_not, starts_with, in, not_in

Example\ + \ reference_invoice_id[is]\ + \ = \"INVOICE_876\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: INVOICE_876 + deprecated: false + - name: type + in: query + description: "optional, enumerated string filter
The\ + \ credit note type. Possible values are : adjustment, refundable.
Supported\ + \ operators : is, is_not, in, not_in

Example type[is_not] = \"adjustment\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`adjustment\` - Adjustment Credit Note \* \`refundable\` - Refundable Credit Note + enum: + - adjustment + - refundable + is_not: + type: string + description: | + \* \`adjustment\` - Adjustment Credit Note \* \`refundable\` - Refundable Credit Note + enum: + - adjustment + - refundable + in: + pattern: "^\\[(adjustment|refundable)(,(adjustment|refundable))*\\]$" + type: string + not_in: + pattern: "^\\[(adjustment|refundable)(,(adjustment|refundable))*\\]$" + type: string + example: adjustment + deprecated: false + - name: reason_code + in: query + description: "optional, enumerated string filter
The\ + \ reason for issuing this Credit Note. The following reason codes are supported\ + \ now[Deprecated; use the create_reason_code parameter instead]. Possible values are : write_off,\ + \ subscription_change, subscription_cancellation, subscription_pause, chargeback,\ + \ product_unsatisfactory, service_unsatisfactory, order_change, order_cancellation,\ + \ waiver, other, fraudulent.
Supported operators : is, is_not,\ + \ in, not_in

Example reason_code[is]\ + \ = \"waiver\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`write_off\` - This reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off) operation. \* \`subscription_change\` - This reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html) is enabled \* \`subscription_cancellation\` - This reason will be set automatically for Credit Notes created during cancel subscription operation \* \`subscription_pause\` - This reason will be automatically set to credit notes created during pause/resume subscription operation. \* \`chargeback\` - Can be set when you are recording your customer Chargebacks \* \`product_unsatisfactory\` - Product Unsatisfactory \* \`service_unsatisfactory\` - Service Unsatisfactory \* \`order_change\` - Order Change \* \`order_cancellation\` - Order Cancellation \* \`waiver\` - Waiver \* \`other\` - Can be set when none of the above reason codes are applicable \* \`fraudulent\` - FRAUDULENT + enum: + - write_off + - subscription_change + - subscription_cancellation + - subscription_pause + - chargeback + - product_unsatisfactory + - service_unsatisfactory + - order_change + - order_cancellation + - waiver + - other + - fraudulent + is_not: + type: string + description: | + \* \`write_off\` - This reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off) operation. \* \`subscription_change\` - This reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html) is enabled \* \`subscription_cancellation\` - This reason will be set automatically for Credit Notes created during cancel subscription operation \* \`subscription_pause\` - This reason will be automatically set to credit notes created during pause/resume subscription operation. \* \`chargeback\` - Can be set when you are recording your customer Chargebacks \* \`product_unsatisfactory\` - Product Unsatisfactory \* \`service_unsatisfactory\` - Service Unsatisfactory \* \`order_change\` - Order Change \* \`order_cancellation\` - Order Cancellation \* \`waiver\` - Waiver \* \`other\` - Can be set when none of the above reason codes are applicable \* \`fraudulent\` - FRAUDULENT + enum: + - write_off + - subscription_change + - subscription_cancellation + - subscription_pause + - chargeback + - product_unsatisfactory + - service_unsatisfactory + - order_change + - order_cancellation + - waiver + - other + - fraudulent + in: + pattern: "^\\[(write_off|subscription_change|subscription_cancellation|subscription_pause|chargeback|product_unsatisfactory|service_unsatisfactory|order_change|order_cancellation|waiver|other|fraudulent)(,(write_off|subscription_change|subscription_cancellation|subscription_pause|chargeback|product_unsatisfactory|service_unsatisfactory|order_change|order_cancellation|waiver|other|fraudulent))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(write_off|subscription_change|subscription_cancellation|subscription_pause|chargeback|product_unsatisfactory|service_unsatisfactory|order_change|order_cancellation|waiver|other|fraudulent)(,(write_off|subscription_change|subscription_cancellation|subscription_pause|chargeback|product_unsatisfactory|service_unsatisfactory|order_change|order_cancellation|waiver|other|fraudulent))*\\\ + ]$" + type: string + example: waiver + deprecated: false + - name: create_reason_code + in: query + description: "optional, string filter
Reason\ + \ code for creating the credit note. Must be one from a list of reason codes\ + \ set in the Chargebee app in Settings > Configure Chargebee > Reason\ + \ Codes > Credit Notes > Create Credit Note. Must be passed if\ + \ set as mandatory in the app. The codes are case-sensitive.
Supported\ + \ operators : is, is_not, starts_with, in, not_in

Example\ + \ create_reason_code[is] =\ + \ \"Other\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: Other + deprecated: false + - name: status + in: query + description: "optional, enumerated string filter
The\ + \ credit note status. Possible values are : adjusted, refunded, refund_due,\ + \ voided.
Supported operators : is, is_not, in, not_in

Example\ + \ status[is] = \"adjusted\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`adjusted\` - When the Credit Note has been adjusted against an invoice. \* \`refunded\` - When the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded). \* \`refund_due\` - When the credits are yet to be used, or have been partially used. \* \`voided\` - When the Credit Note has been cancelled. + enum: + - adjusted + - refunded + - refund_due + - voided + is_not: + type: string + description: | + \* \`adjusted\` - When the Credit Note has been adjusted against an invoice. \* \`refunded\` - When the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded). \* \`refund_due\` - When the credits are yet to be used, or have been partially used. \* \`voided\` - When the Credit Note has been cancelled. + enum: + - adjusted + - refunded + - refund_due + - voided + in: + pattern: "^\\[(adjusted|refunded|refund_due|voided)(,(adjusted|refunded|refund_due|voided))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(adjusted|refunded|refund_due|voided)(,(adjusted|refunded|refund_due|voided))*\\\ + ]$" + type: string + example: adjusted + deprecated: false + - name: date + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
The date the Credit Note is issued.
Supported operators\ + \ : after, before, on, between

Example date[on] = \"1435054328\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1435054328" + deprecated: false + - name: total + in: query + description: "optional, in cents filter
Credit\ + \ Note amount in cents.
Supported operators : is, is_not, lt,\ + \ lte, gt, gte, between

Example total[is] = \"1200\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + example: "1200" + deprecated: false + - name: price_type + in: query + description: "optional, enumerated string filter
The\ + \ price type of the Credit Note. Possible values are : tax_exclusive,\ + \ tax_inclusive.
Supported operators : is, is_not, in, not_in

Example\ + \ price_type[is_not] = \"\ + tax_exclusive\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`tax_exclusive\` - All amounts in the document are exclusive of tax. \* \`tax_inclusive\` - All amounts in the document are inclusive of tax. + enum: + - tax_exclusive + - tax_inclusive + is_not: + type: string + description: | + \* \`tax_exclusive\` - All amounts in the document are exclusive of tax. \* \`tax_inclusive\` - All amounts in the document are inclusive of tax. + enum: + - tax_exclusive + - tax_inclusive + in: + pattern: "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\\ + ]$" + type: string + example: tax_exclusive + deprecated: false + - name: amount_allocated + in: query + description: "optional, in cents filter
The\ + \ amount allocated to the invoices.
Supported operators : is,\ + \ is_not, lt, lte, gt, gte, between

Example amount_allocated[is] = \"1200\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + example: "1200" + deprecated: false + - name: amount_refunded + in: query + description: "optional, in cents filter
The\ + \ refunds issued from this Credit Note.
Supported operators : is,\ + \ is_not, lt, lte, gt, gte, between

Example amount_refunded[lte] = \"130\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + example: "130" + deprecated: false + - name: amount_available + in: query + description: "optional, in cents filter
The\ + \ yet to be used credits of this Credit Note.
Supported operators\ + \ : is, is_not, lt, lte, gt, gte, between

Example amount_available[gt] = \"1400\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + example: "1400" + deprecated: false + - name: voided_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
Timestamp indicating the date and time this Credit Note\ + \ gets voided.
Supported operators : after, before, on, between

Example\ + \ voided_at[before] = \"1435054328\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1435054328" + deprecated: false + - name: updated_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
To filter based on updated at. This attribute will be\ + \ present only if the resource has been updated after 2016-09-28.
Supported\ + \ operators : after, before, on, between

Example updated_at[on] = \"1243545465\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1243545465" + deprecated: false + - name: sort_by + in: query + description: "optional, string filter
Sorts\ + \ based on the specified attribute.
Supported attributes : date
Supported\ + \ sort-orders : asc, desc

Example sort_by[asc] = \"date\"
This will\ + \ sort the result based on the 'date' attribute in ascending(earliest first)\ + \ order." + required: false + style: deepObject + explode: true + schema: + minProperties: 1 + type: object + properties: + asc: + type: string + enum: + - date + desc: + type: string + enum: + - date + additionalProperties: false + - name: channel + in: query + description: "optional, enumerated string filter
The\ + \ subscription channel this object originated from and is maintained in.\ + \ Possible values are : web, app_store, play_store.
Supported\ + \ operators : is, is_not, in, not_in

Example channel[is] = \"APP STORE\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: "\\* \\`web\\` - The object was created (and is maintained)\ + \ for the web channel directly in Chargebee via API or UI. \\* \\\ + `app_store\\` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this object via\ + \ UI or API is disallowed. \\* \\`play_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of this object\ + \ via UI or API is disallowed. \n\nIn-App Subscriptions is currently\ + \ in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com)\ + \ for more information.\n" + enum: + - web + - app_store + - play_store + is_not: + type: string + description: "\\* \\`web\\` - The object was created (and is maintained)\ + \ for the web channel directly in Chargebee via API or UI. \\* \\\ + `app_store\\` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this object via\ + \ UI or API is disallowed. \\* \\`play_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of this object\ + \ via UI or API is disallowed. \n\nIn-App Subscriptions is currently\ + \ in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com)\ + \ for more information.\n" + enum: + - web + - app_store + - play_store + in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + example: APP STORE + deprecated: false + - name: einvoice + in: query + description: Parameters for einvoice + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + status: + type: object + properties: + is: + type: string + description: | + \* \`scheduled\` - Sending the e-invoice to the customer has been scheduled. \* \`skipped\` - The e-invoice was not sent. This could be due to missing information or because the `entity_identifier` is not registered on the e-invoicing network. \* \`in_progress\` - The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity. \* \`success\` - The e-invoice has been successfully delivered to the customer. \* \`failed\` - The e-invoice was sent and there was an error due to which it was not delivered. \* \`registered\` - The e-invoice was sent and there was an error due to which it was not delivered but got cleared in the IRP. + enum: + - scheduled + - skipped + - in_progress + - success + - failed + - registered + is_not: + type: string + description: | + \* \`scheduled\` - Sending the e-invoice to the customer has been scheduled. \* \`skipped\` - The e-invoice was not sent. This could be due to missing information or because the `entity_identifier` is not registered on the e-invoicing network. \* \`in_progress\` - The e-invoice has been sent and Chargebee is waiting for confirmation from the receiving entity. \* \`success\` - The e-invoice has been successfully delivered to the customer. \* \`failed\` - The e-invoice was sent and there was an error due to which it was not delivered. \* \`registered\` - The e-invoice was sent and there was an error due to which it was not delivered but got cleared in the IRP. + enum: + - scheduled + - skipped + - in_progress + - success + - failed + - registered + in: + pattern: "^\\[(scheduled|skipped|in_progress|success|failed|registered)(,(scheduled|skipped|in_progress|success|failed|registered))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(scheduled|skipped|in_progress|success|failed|registered)(,(scheduled|skipped|in_progress|success|failed|registered))*\\\ + ]$" + type: string + description: | + The status of processing the e-invoice. To obtain detailed information about the current \`status\`, see \`message\`. + example: failed + deprecated: false + deprecated: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - credit_note + type: object + properties: + credit_note: + $ref: '#/components/schemas/CreditNote' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + post: + summary: Create credit note + description: "Creates a `credit_note` for the specified invoice. \n**Note:**\n\ + \nIf the `credit_note` [type](/docs/api/credit_notes#create_credit_note_type)\ + \ is `refundable`, then `linked_taxes_withheld.amount` for the [invoice specified](/docs/api/credit_notes#create_credit_note_reference_invoice_id)\ + \ can also be included in the [total](/docs/api/credit_notes#create_credit_note_total).\n" + operationId: create_credit_note + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})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?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - type + type: object + properties: + reference_invoice_id: + maxLength: 50 + type: string + description: | + The identifier of the invoice against which this Credit Note is issued. + deprecated: false + customer_id: + maxLength: 50 + type: string + deprecated: false + total: + minimum: 0 + type: integer + description: | + Credit Note amount in cents. You can either pass the total parameter or the line_items parameter. Passing both will result in an error. + format: int64 + deprecated: false + default: 0 + type: + type: string + description: | + The credit note type. \* refundable - Refundable Credit Note \* adjustment - Adjustment Credit Note + deprecated: false + enum: + - adjustment + - refundable + reason_code: + type: string + description: | + The reason for issuing this Credit Note. The following reason codes are supported now\[Deprecated; use the [create_reason_code](/docs/api/credit_notes#credit_note_create_reason_code) parameter instead\]. \* chargeback - Can be set when you are recording your customer Chargebacks \* subscription_change - This reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html) is enabled \* waiver - Waiver \* order_cancellation - Order Cancellation \* order_change - Order Change \* product_unsatisfactory - Product Unsatisfactory \* subscription_pause - This reason will be automatically set to credit notes created during pause/resume subscription operation. \* service_unsatisfactory - Service Unsatisfactory \* other - Can be set when none of the above reason codes are applicable \* subscription_cancellation - This reason will be set automatically for Credit Notes created during cancel subscription operation \* write_off - This reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off) operation. \* fraudulent - FRAUDULENT + deprecated: false + enum: + - product_unsatisfactory + - service_unsatisfactory + - order_change + - order_cancellation + - waiver + - other + create_reason_code: + maxLength: 100 + type: string + description: | + Reason code for creating the credit note. Must be one from a list of reason codes set in the Chargebee app in **Settings \> Configure Chargebee \> Reason Codes \> Credit Notes \> Create Credit Note**. Must be passed if set as mandatory in the app. The codes are case-sensitive. + deprecated: false + date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The date the Credit Note is issued. + format: unix-time + deprecated: false + customer_notes: + maxLength: 2000 + type: string + description: | + A note to be added for this operation, to the credit note. This note is displayed on customer-facing documents such as the [Credit Note PDF](./credit_notes#retrieve_credit_note_as_pdf). + deprecated: false + currency_code: + maxLength: 3 + type: string + deprecated: false + comment: + maxLength: 300 + type: string + description: | + An internal [comment](./comments) to be added for this operation, to the credit note. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](./hosted_pages) or any document such as the [Credit Note PDF](./credit_notes#retrieve_credit_note_as_pdf). + deprecated: false + line_items: + type: object + properties: + reference_line_item_id: + type: array + description: | + Uniquely identifies a line_item + items: + maxLength: 40 + type: string + deprecated: false + unit_amount: + type: array + description: | + Unit amount of the line item. Required for FLAT_FEE, PER_UNIT and VOLUME pricing model. + items: + type: integer + format: int64 + deprecated: false + unit_amount_in_decimal: + type: array + description: | + The decimal representation of the unit amount of the `line_item`. The value is in major units of the currency. Applicable for the line_item when the `pricing_model` is `flat_fee`, `per_unit` or `volume`. Can be provided only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units ) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + quantity: + type: array + description: | + Quantity of the line item. Required for PER_UNIT and VOLUME pricing model. + items: + type: integer + format: int32 + deprecated: false + default: 1 + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of the `line_item`. Applicable for the `line_item` when the `pricing_model` is `per_unit` and `volume`. Can be provided only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units ) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + amount: + type: array + description: | + Amount of the line item. Applicable only for STAIRSTEP, TIERED pricing_model. + items: + type: integer + format: int64 + deprecated: false + date_from: + type: array + description: | + Start date of this line item. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + date_to: + type: array + description: | + End date of this line item. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + description: + type: array + description: | + Description for the line item. + items: + maxLength: 250 + type: string + deprecated: false + entity_type: + type: array + items: + type: string + description: | + null + deprecated: false + enum: + - adhoc + - plan_item_price + - addon_item_price + - charge_item_price + entity_id: + type: array + items: + maxLength: 100 + type: string + deprecated: false + description: | + Parameters for line_items + deprecated: false + encoding: + line_items: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - credit_note + type: object + properties: + credit_note: + $ref: '#/components/schemas/CreditNote' + invoice: + $ref: '#/components/schemas/Invoice' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /credit_notes/{credit-note-id}/record_refund: + post: + summary: Record refund for a credit note + description: | + Refunds a ([refundable](https://www.chargebee.com/docs/credit-notes.html#types-of-credit-notes_refundable-credit-note)) credit note. The refund is provided against `linked_payments` first and then against any `linked_taxes_withheld` for the [invoice](/docs/api/credit_notes#credit_note_reference_invoice_id) associated with the `credit_note`. For payments made via online transactions, the refund request is processed via the [payment source](/docs/api/payment_sources) associated with the [transaction](/docs/api/transactions). + operationId: record_refund_for_a_credit_note + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9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?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: credit-note-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + refund_reason_code: + maxLength: 100 + type: string + description: | + Reason code for the refund. Must be one from a list of reason codes set in the Chargebee app in **Settings \> Configure Chargebee \> Reason Codes \> Credit Notes \> Refund Credit Note**. Must be passed if set as mandatory in the app. The codes are case-sensitive. + deprecated: false + comment: + maxLength: 300 + type: string + description: | + Remarks, if any, on the refund. + deprecated: false + transaction: + required: + - date + - payment_method + type: object + properties: + amount: + minimum: 1 + type: integer + description: | + The amount to be refunded (for online payments) or recorded as refunded (for offline payments). If not specified, the entire [refundable amount](/docs/api/credit_notes#credit_note_amount_available) for this `credit_note` is refunded. Note: Any [linked_tax_withheld_refunds](/docs/api/credit_notes#credit_note_linked_tax_withheld_refunds) associated with the `credit_note` can also be recorded as refunded via this operation. + format: int64 + deprecated: false + payment_method: + type: string + description: | + The payment method of this transaction \* cash - Cash \* paypal_express_checkout - Paypal Express Checkout \* automated_bank_transfer - Automated Bank Transfer \* venmo - Venmo \* bancontact - Bancontact \* custom - Custom \* ideal - IDEAL \* check - Check \* upi - upi \* sepa_instant_transfer - Sepa Instant Transfer \* alipay - Alipay \* sepa_credit - SEPA Credit \* ach_credit - ACH Credit \* faster_payments - Faster Payments \* sofort - Sofort \* direct_debit - Direct Debit \* bank_transfer - Bank Transfer \* chargeback - Only applicable for a transaction of [type](transactions#transaction_type) = `refund`. This value is set by Chargebee when an automated [chargeback](https://www.chargebee.com/docs/chargeback.html#chargeback-process) occurs. You can also set this explicitly when [recording a refund](transactions#record_an_offline_refund). \* unionpay - Unionpay \* apple_pay - Apple Pay \* dotpay - Dotpay \* netbanking_emandates - netbanking_emandates \* amazon_payments - Amazon Payments \* wechat_pay - WeChat Pay \* google_pay - Google Pay \* card - Card \* klarna_pay_now - Klarna Pay Now \* other - Payment Methods other than the above types \* boleto - boleto \* giropay - giropay \* pay_to - PayTo + deprecated: false + enum: + - cash + - check + - chargeback + - bank_transfer + - other + - custom + reference_number: + maxLength: 100 + type: string + description: | + The reference number for this transaction. For example, the check number when [payment_method](transactions#transaction_payment_method) = `check`. + deprecated: false + custom_payment_method_id: + maxLength: 50 + type: string + description: | + Identifier of the custom payment method of this transaction. + deprecated: false + date: + pattern: "^[0-9]{10}$" + type: integer + description: | + Indicates when this transaction occurred. + format: unix-time + deprecated: false + description: | + Parameters for transaction + deprecated: false + encoding: + transaction: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - credit_note + type: object + properties: + credit_note: + $ref: '#/components/schemas/CreditNote' + transaction: + $ref: '#/components/schemas/Transaction' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /credit_notes/import_credit_note: + post: + summary: Import credit note + description: | + Use this api to import credit notes into your Chargebee site. Billing address, Shipping Address, Vat number will be copied from the reference invoice. + operationId: import_credit_note + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):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[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - create_reason_code + - date + - id + - reference_invoice_id + - type + type: object + properties: + id: + maxLength: 50 + type: string + description: | + Credit Note Number. + deprecated: false + customer_id: + maxLength: 50 + type: string + description: | + This identifies the customer for whom the credit note needs to be created. + deprecated: false + subscription_id: + maxLength: 50 + type: string + description: | + The identifier of the subscription for which this credit note needs to be created. + deprecated: false + reference_invoice_id: + maxLength: 50 + type: string + description: | + The identifier of the invoice against which this Credit Note is issued. + deprecated: false + type: + type: string + description: | + The credit note type. \* refundable - Refundable Credit Note \* adjustment - Adjustment Credit Note + deprecated: false + enum: + - adjustment + - refundable + currency_code: + maxLength: 3 + type: string + description: | + The currency code (ISO 4217 format) for the credit note. + deprecated: false + create_reason_code: + maxLength: 100 + type: string + description: | + Reason code for creating the credit note. Must be one from a list of reason codes set in the Chargebee app in **Settings \> Configure Chargebee \> Reason Codes \> Credit Notes \> Create Credit Note**. Must be passed if set as mandatory in the app. The codes are case-sensitive. + deprecated: false + date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The date the Credit Note is issued. + format: unix-time + deprecated: false + status: + type: string + description: | + The credit note status. \* refund_due - When the credits are yet to be used, or have been partially used. \* refunded - When the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded). \* voided - When the Credit Note has been cancelled. \* adjusted - When the Credit Note has been adjusted against an invoice. + deprecated: false + enum: + - adjusted + - refunded + - refund_due + - voided + total: + minimum: 0 + type: integer + description: | + Credit Note amount in cents. + format: int64 + deprecated: false + default: 0 + refunded_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + The time this Credit Note gets fully used. Please note that this field is not present when partial refunds are issued. + format: unix-time + deprecated: false + voided_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + Timestamp indicating the date and time this Credit Note gets voided. + format: unix-time + deprecated: false + sub_total: + minimum: 0 + type: integer + description: | + The Credit Note sub-total. + format: int64 + deprecated: false + round_off_amount: + maximum: 99 + minimum: -99 + type: integer + description: | + Indicates the rounded-off amount. For example, if your invoice amount is $99.99, and the amount is rounded off to $100.00, in this case, $100.00 is your invoice amount, $0.01 is the `round_off_amount`. If there is no `round-off amount`, it will display `0`. + format: int64 + deprecated: false + fractional_correction: + maximum: 50000 + minimum: -50000 + type: integer + description: | + Indicates the fractional correction amount. + format: int64 + deprecated: false + vat_number_prefix: + maxLength: 10 + type: string + description: "An overridden value for the first two characters of\ + \ the [full VAT\nnumber](https://en.wikipedia.org/wiki/VAT_identification_number).\ + \ Only applicable specifically for customers with [billing_address](customers#customer_billing_address)\ + \ `country` as `XI` (which is **United Kingdom - Northern Ireland**\ + \ ). \n\nWhen you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or have [manually\nenabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, you have the option of setting [billing_address](customers#customer_billing_address)\ + \ `country` as `XI`. That's the code for **United Kingdom - Northern\n\ + Ireland** . The first two characters of the VAT number in such\ + \ a case is `XI` by default. However, if the VAT number was registered\ + \ in UK, the value should be `GB`. Set `vat_number_prefix` to\ + \ `GB` for such cases.\n" + deprecated: false + line_items: + required: + - description + type: object + properties: + reference_line_item_id: + type: array + description: | + Uniquely identifies a line_item of invoice for which this reversal represents. + items: + maxLength: 40 + type: string + deprecated: false + id: + type: array + description: | + Uniquely identifies a line_item + items: + maxLength: 40 + type: string + deprecated: false + date_from: + type: array + description: | + Start date of this line item. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + date_to: + type: array + description: | + End date of this line item. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + subscription_id: + type: array + description: | + A unique identifier for the subscription this line item belongs to. + items: + maxLength: 50 + type: string + deprecated: false + description: + type: array + description: | + Description for this line item + items: + maxLength: 250 + type: string + deprecated: false + unit_amount: + type: array + description: | + Unit amount of the line item. + items: + type: integer + format: int64 + deprecated: false + quantity: + type: array + description: "[Quantity of the recurring item](/docs/api/invoices?prod_cat_ver=2#invoice_line_items_quantity)\ + \ which is represented by this line item. For `metered` line\ + \ items, this value is updated from [usages](/docs/api/usages)\ + \ once when the invoice is generated as `pending` and finally\ + \ when the invoice is [closed](/docs/api/invoices#close_a_pending_invoice).\ + \ \n[Quantity of the recurring item](/docs/api/invoices?prod_cat_ver=1#invoice_line_items_quantity)\ + \ which is represented by this line item.\n" + items: + type: integer + format: int32 + deprecated: false + default: 1 + amount: + type: array + description: | + Total amount of this lineitem. Not required if the line_items\[unit_amount\] param is passed + items: + type: integer + format: int64 + deprecated: false + unit_amount_in_decimal: + type: array + description: | + The decimal representation of the unit amount of the `line_item`. The value is in major units of the currency. Returned when the `line_item` is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of this line_item. Returned when the `line_item` is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + amount_in_decimal: + type: array + description: | + The decimal representation of the amount for the `line_item`, in major units of the currency. Typically equals to `unit_amount_in_decimal` x `quantity_in_decimal`. Returned when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + entity_type: + type: array + items: + type: string + description: | + Specifies the modelled entity this line item is based on. \* addon - Indicates that this lineitem is based on 'Addon' entity. The 'entity_id' attribute specifies the [addon](/docs/api/addons#addon_attributes) id \* plan_item_price - Indicates that this line item is based on plan Item Price \* addon_item_price - Indicates that this line item is based on addon Item Price \* charge_item_price - Indicates that this line item is based on charge Item Price \* adhoc - Indicates that this lineitem is not modelled. i.e created adhoc. So the 'entity_id' attribute will be null in this case \* plan_setup - Indicates that this lineitem is based on 'Plan Setup' charge. The 'entity_id' attribute specifies the [plan](/docs/api/plans#plan_attributes) id \* plan - Indicates that this lineitem is based on 'Plan' entity. The 'entity_id' attribute specifies the [plan](/docs/api/plans#plan_attributes) id + deprecated: false + enum: + - adhoc + - plan_item_price + - addon_item_price + - charge_item_price + entity_id: + type: array + description: | + The identifier of the modelled entity this line item is based on. Will be null for 'adhoc' entity type + items: + maxLength: 100 + type: string + deprecated: false + item_level_discount1_entity_id: + type: array + description: | + First item level discount entity id + items: + maxLength: 100 + type: string + deprecated: false + item_level_discount1_amount: + type: array + description: | + First item level discount amount + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + item_level_discount2_entity_id: + type: array + description: | + Second item level discount entity id + items: + maxLength: 100 + type: string + deprecated: false + item_level_discount2_amount: + type: array + description: | + Second item level discount amount + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + tax1_name: + type: array + description: | + First tax name + items: + maxLength: 50 + type: string + deprecated: false + tax1_amount: + type: array + description: | + First tax amount + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + tax2_name: + type: array + description: | + Second tax name + items: + maxLength: 50 + type: string + deprecated: false + tax2_amount: + type: array + description: | + Second tax amount + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + tax3_name: + type: array + description: | + Third tax name + items: + maxLength: 50 + type: string + deprecated: false + tax3_amount: + type: array + description: | + Third tax amount + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + tax4_name: + type: array + description: | + Fourth tax name + items: + maxLength: 50 + type: string + deprecated: false + tax4_amount: + type: array + description: | + Fourth tax amount + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + tax5_name: + type: array + description: | + Fifth tax name + items: + maxLength: 50 + type: string + deprecated: false + tax5_amount: + type: array + description: | + Fifth tax amount + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + tax6_name: + type: array + description: | + Sixth tax name + items: + maxLength: 50 + type: string + deprecated: false + tax6_amount: + type: array + description: | + Sixth tax amount + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + tax7_name: + type: array + description: | + Seventh tax name + items: + maxLength: 50 + type: string + deprecated: false + tax7_amount: + type: array + description: | + Seventh tax amount + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + tax8_name: + type: array + description: | + Eighth tax name + items: + maxLength: 50 + type: string + deprecated: false + tax8_amount: + type: array + description: | + Eighth tax amount + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + tax9_name: + type: array + description: | + Ninth tax name + items: + maxLength: 50 + type: string + deprecated: false + tax9_amount: + type: array + description: | + Ninth tax amount + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + tax10_name: + type: array + description: | + Tenth tax name + items: + maxLength: 50 + type: string + deprecated: false + tax10_amount: + type: array + description: | + Tenth tax amount + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + description: | + Parameters for line_items + deprecated: false + line_item_tiers: + required: + - line_item_id + type: object + properties: + line_item_id: + type: array + description: | + Uniquely identifies a line_item + items: + maxLength: 40 + type: string + deprecated: false + starting_unit: + type: array + description: | + The lower limit of a range of units for the tier + items: + minimum: 0 + type: integer + format: int32 + deprecated: false + ending_unit: + type: array + description: | + The upper limit of a range of units for the tier + items: + type: integer + format: int32 + deprecated: false + quantity_used: + type: array + description: | + The number of units purchased in a range. + items: + minimum: 0 + type: integer + format: int32 + deprecated: false + unit_amount: + type: array + description: | + The price of the tier if the charge model is a `stairtstep` pricing , or the price of each unit in the tier if the charge model is `tiered`/`volume` pricing. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + starting_unit_in_decimal: + type: array + description: | + The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal` of the next lower tier. Returned only when the `line_items.pricing_model` is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + ending_unit_in_decimal: + type: array + description: | + The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal` of the next higher tier. Returned only when the `line_items.pricing_model` is `tiered`, `volume` or stairstep and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + quantity_used_in_decimal: + type: array + description: | + The decimal representation of the quantity purchased from this tier. Returned when the `line_item` is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + unit_amount_in_decimal: + type: array + description: | + The decimal representation of the per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. When the `pricing_model` is `stairstep`, it is the decimal representation of the total price for `line_item`. The value is in major units of the currency. Returned when the `line_item` is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled. + items: + maxLength: 40 + type: string + deprecated: false + description: | + Parameters for line_item_tiers + deprecated: false + discounts: + required: + - amount + - entity_type + type: object + properties: + line_item_id: + type: array + description: | + The unique id of the line item that this deduction is for. Is required when `discounts[entity_type]` is `item_level_coupon` or `document_level_coupon`. + items: + maxLength: 40 + type: string + deprecated: false + entity_type: + type: array + items: + type: string + description: | + The type of deduction and the amount to which it is applied. \* document_level_coupon - The deduction is due to a coupon applied to the invoice `sub_total`. The coupon id is passed as `entity_id`. \* prorated_credits - The deduction is due to a legacy adjustment credit applied to the invoice. The `entity_id` is `null` in this case. The legacy credits feature is superseded by [adjustment_credit_notes](/docs/api/invoices?prod_cat_ver=2#invoice_adjustment_credit_notes). \* item_level_coupon - The deduction is due to a coupon applied to line item. The coupon `id` is passed as `entity_id`. \* item_level_discount - The deduction is due to a [discount](/docs/api/discounts?prod_cat_ver=2) applied to a line item of the invoice. The discount `id` is available as the `entity_id`. \* promotional_credits - The deduction is due to a [promotional credit](/docs/api/promotional_credits?prod_cat_ver=2) applied to the invoice. \* document_level_discount - The deduction is due to a [discount](/docs/api/discounts?prod_cat_ver=2) applied to the invoice `sub_total`. The discount `id` is available as the `entity_id`. + deprecated: false + enum: + - item_level_coupon + - document_level_coupon + - promotional_credits + - item_level_discount + - document_level_discount + entity_id: + type: array + description: | + When the deduction is due to a `coupon`, then this is the `id` of the coupon. Is required when `discounts[entity_type]` is `item_level_coupon` or `document_level_coupon`. + items: + maxLength: 100 + type: string + deprecated: false + description: + type: array + description: | + Description for this deduction. + items: + maxLength: 250 + type: string + deprecated: false + amount: + type: array + description: | + The amount deducted. The format of this value depends on the [kind of currency](/docs/api?prod_cat_ver=2#currencies). + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + description: | + Parameters for discounts + deprecated: false + taxes: + required: + - name + - rate + type: object + properties: + name: + type: array + description: | + The name of the tax applied + items: + maxLength: 100 + type: string + deprecated: false + rate: + type: array + description: | + The rate of tax used to calculate tax amount + items: + maximum: 100 + minimum: 0 + type: number + format: double + deprecated: false + default: 0 + amount: + type: array + description: | + Total tax amount charged for this invoice + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + description: + type: array + description: | + Description of tax + items: + maxLength: 50 + type: string + deprecated: false + juris_type: + type: array + items: + type: string + description: | + The type of tax jurisdiction \* country - The tax jurisdiction is a country \* special - Special tax jurisdiction. \* county - The tax jurisdiction is a county \* state - The tax jurisdiction is a state \* city - The tax jurisdiction is a city \* other - Jurisdictions other than the ones listed above. \* unincorporated - Combined tax of state and county. \* federal - The tax jurisdiction is a federal + deprecated: false + default: other + enum: + - country + - federal + - state + - county + - city + - special + - unincorporated + - other + juris_name: + type: array + description: | + The name of the tax jurisdiction + items: + maxLength: 250 + type: string + deprecated: false + juris_code: + type: array + description: | + The tax jurisdiction code + items: + maxLength: 250 + type: string + deprecated: false + description: | + Parameters for taxes + deprecated: false + allocations: + required: + - allocated_amount + - allocated_at + - invoice_id + type: object + properties: + invoice_id: + type: array + description: | + The unique invoice ID for the allocation + items: + maxLength: 50 + type: string + deprecated: false + allocated_amount: + type: array + description: | + The allocated amount for the credit note + items: + minimum: 1 + type: integer + format: int64 + deprecated: false + allocated_at: + type: array + description: | + Time when the allocation was occurred + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + description: | + Parameters for allocations + deprecated: false + linked_refunds: + required: + - amount + - date + - payment_method + type: object + properties: + amount: + type: array + description: | + Amount of this refund transaction. + items: + minimum: 1 + type: integer + format: int64 + deprecated: false + payment_method: + type: array + items: + type: string + description: | + Mode of refund. \* amazon_payments - Amazon Payments \* sepa_credit - SEPA Credit \* sofort - Sofort \* alipay - Alipay \* automated_bank_transfer - Automated Bank Transfer \* direct_debit - Direct Debit \* giropay - giropay \* dotpay - Dotpay \* bancontact - Bancontact \* other - Payment Methods other than the above types \* upi - upi \* wechat_pay - WeChat Pay \* netbanking_emandates - netbanking_emandates \* venmo - Venmo \* faster_payments - Faster Payments \* klarna_pay_now - Klarna Pay Now \* unionpay - Unionpay \* ideal - IDEAL \* cash - Cash \* chargeback - Only applicable for a transaction of [type](transactions#transaction_type) = `refund`. This value is set by Chargebee when an automated [chargeback](https://www.chargebee.com/docs/chargeback.html#chargeback-process) occurs. You can also set this explicitly when [recording a refund](transactions#record_an_offline_refund). \* boleto - boleto \* custom - Custom \* google_pay - Google Pay \* paypal_express_checkout - Paypal Express Checkout \* pay_to - PayTo \* card - Card \* bank_transfer - Bank Transfer \* apple_pay - Apple Pay \* sepa_instant_transfer - Sepa Instant Transfer \* check - Check \* ach_credit - ACH Credit + deprecated: false + enum: + - cash + - check + - bank_transfer + - other + - custom + date: + type: array + description: | + The date of refund. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + reference_number: + type: array + description: | + Reference number for this refund. + items: + maxLength: 100 + minLength: 1 + type: string + deprecated: false + description: | + Parameters for linked_refunds + deprecated: false + encoding: + allocations: + style: deepObject + explode: true + discounts: + style: deepObject + explode: true + line_item_tiers: + style: deepObject + explode: true + line_items: + style: deepObject + explode: true + linked_refunds: + style: deepObject + explode: true + taxes: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - credit_note + type: object + properties: + credit_note: + $ref: '#/components/schemas/CreditNote' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /credit_notes/{credit-note-id}/delete: + post: + summary: Delete a credit Note + description: | + This API [deletes a credit note.](https://www.chargebee.com/docs/credit-notes.html#voiding-or-deleting-a-credit-note) A credit note once deleted, is deleted permanently. You cannot delete a credit which has already been deleted or refunded. If you try to delete a refunded or deleted credit note, an error message will be displayed. + operationId: delete_a_credit_note + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0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})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: credit-note-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + comment: + maxLength: 300 + type: string + description: | + Reason for deleting this credit note. This comment will be added to the associated invoice entity. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - credit_note + type: object + properties: + credit_note: + $ref: '#/components/schemas/CreditNote' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /credit_notes/{credit-note-id}/download_einvoice: + get: + summary: Download e-invoice for credit note + description: "Download the e-invoice for the credit note in both XML and PDF\ + \ formats. The response consists of a `download` object for each format. The\ + \ XML format follows the [structure as per Peppol BIS Billing v3.0](https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-creditnote/tree/).\ + \ \n**Note**\n\n* You can only download e-invoices when their `status` is\ + \ `success` or `registered`.\n* There are some cases in which the PDF is not\ + \ available for download. In such cases, you can obtain it from the XML by\ + \ decoding the value for [cbc:EmbeddedDocumentBinaryObject](https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-creditnote/cac-AdditionalDocumentReference/cac-Attachment/cbc-EmbeddedDocumentBinaryObject/),\ + \ which is the Base64-encoded version of the PDF.\n" + operationId: download_e-invoice_for_credit_note + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]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4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: credit-note-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - downloads + type: object + properties: + downloads: + type: array + items: + $ref: '#/components/schemas/Download' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /credit_notes/{credit-note-id}/pdf: + post: + summary: Retrieve credit note as PDF + description: | + Gets the credit note as PDF. The returned URL is secure and allows download. The URL will expire in 60 minutes. + operationId: retrieve_credit_note_as_pdf + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f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A-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: credit-note-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + disposition_type: + type: string + description: | + Determines the pdf should be rendered as inline or attachment in the browser. \* attachment - PDF is rendered as attachment in the browser \* inline - PDF is rendered as inline in the browser + deprecated: false + default: attachment + enum: + - attachment + - inline + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - download + type: object + properties: + download: + $ref: '#/components/schemas/Download' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /credit_notes/{credit-note-id}/resend_einvoice: + post: + summary: Resend failed einvoice in credit notes + description: | + Resend failed einvoice in credit notes. + operationId: resend_failed_einvoice_in_credit_notes + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(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:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: credit-note-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - credit_note + type: object + properties: + credit_note: + $ref: '#/components/schemas/CreditNote' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /credit_notes/{credit-note-id}/remove_tax_withheld_refund: + post: + summary: Remove tax withheld refunds from a credit note + description: | + Removes a [linked_tax_withheld_refunds](/docs/api/credit_notes#credit_note_linked_tax_withheld_refunds) record from the `credit_note`. + operationId: remove_tax_withheld_refunds_from_a_credit_note + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[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\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: credit-note-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + tax_withheld: + required: + - id + type: object + properties: + id: + maxLength: 40 + type: string + description: | + An auto-generated unique identifier for the tax withheld. The value starts with the prefix `tax_wh_`. For example, `tax_wh_16BdDXSlbu4uV1Ee6`. + deprecated: false + description: | + Parameters for tax_withheld + deprecated: false + encoding: + tax_withheld: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - credit_note + type: object + properties: + credit_note: + $ref: '#/components/schemas/CreditNote' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /credit_notes/{credit-note-id}: + get: + summary: Retrieve a credit note + description: | + Retrieves the Credit Note identified by the specified Credit Note number. + operationId: retrieve_a_credit_note + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F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]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: credit-note-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - credit_note + type: object + properties: + credit_note: + $ref: '#/components/schemas/CreditNote' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /credit_notes/{credit-note-id}/send_einvoice: + post: + summary: Send an einvoice for credit notes + description: |+ + This endpoint is used to send an e-invoice for invoice. + + To support cases like TDS and invoice edits, we need to stop auto e-invoice sending and be able to send e-invoices manually. + + This endpoint schedules e-invoices manually. This operation is not allowed when any of the following condition matches: + + * If e-invoicing is not enabled at the site and customer level. + + * If there is an e-invoice generated already for the invoice. + + * If the "**Use automatic e-invoicing**" option is selected. + + * If there are no generated e-invoices with the `failed` or `skipped` status. + + * If the invoice status is `voided` or `pending`. + + operationId: send_an_einvoice_for_credit_notes + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: credit-note-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - credit_note + type: object + properties: + credit_note: + $ref: '#/components/schemas/CreditNote' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /unbilled_charges/{unbilled-charge-id}/delete: + post: + summary: Delete an unbilled charge + description: | + Use this API to delete an unbilled charge by specifying the id of the charge. + operationId: delete_an_unbilled_charge + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: unbilled-charge-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - unbilled_charge + type: object + properties: + unbilled_charge: + $ref: '#/components/schemas/UnbilledCharge' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /unbilled_charges/invoice_now_estimate: + post: + summary: Create an estimate for unbilled charges + description: |+ + This is similar to the "Create an invoice for unbilled charges" API but no invoice will be created, only an estimate for this operation is created. + + In the estimate response, + + * **estimate.invoice_estimates** is an array of **estimate.invoice_estimate**. This has the details of the invoices that will be generated now. + + **Note:** + + * This API when invoked does not perform the actual operation. It just generates an estimate. + * Both *subscription_id* and *customer_id* parameters should not be given at the same time. + + + + operationId: create_an_estimate_for_unbilled_charges + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?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,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + subscription_id: + maxLength: 50 + type: string + description: | + Identifier of the subscription for which this estimate needs to be created. Should be given if 'customer_id' is not specified. + deprecated: false + customer_id: + maxLength: 50 + type: string + description: | + Identifier of the customer for whom this estimate is created. Is given if 'subscription_id' is not specified. Applicable only if the 'Consolidated Invoicing' is enabled. If 'Consolidated Invoicing' is not enabled, an invoice will be generated for every subscription. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - estimate + type: object + properties: + estimate: + $ref: '#/components/schemas/Estimate' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /unbilled_charges/invoice_unbilled_charges: + post: + summary: Create an invoice for unbilled charges + description: | + Use this API to bill the [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html). Available Credits and Excess Payments will automatically be applied while creating the invoice. + + If the *Auto Collection* is turned on for the particular customer, the invoice will be created in payment_due state and the payment collection will be scheduled immediately. + + During invoice creation, the PO number for the line items will be filled from the subscription's current PO number, if available. + + If no recurring item is present in the created invoice, the invoice will be marked as recurring=false. + + If consolidated invoicing is enabled and the parameter 'customer_id' is passed, multiple invoices can be created based on the following factors. + + * Currency + * PO number if 'Group by PO number' is enabled + * Shipping address + * Auto Collection + * Payment method + operationId: create_an_invoice_for_unbilled_charges + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::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:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + subscription_id: + maxLength: 50 + type: string + description: | + Identifier of the subscription for which this invoice needs to be created. Should be specified if 'customer_id' is not specified. + deprecated: false + customer_id: + maxLength: 50 + type: string + description: | + Identifier of the customer for whom this invoice needs to be created. Should be specified if 'subscription_id' is not specified. Applicable only if the consolidated invoicing is enabled. . + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - invoices + type: object + properties: + invoices: + type: array + items: + $ref: '#/components/schemas/Invoice' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /unbilled_charges: + get: + summary: List unbilled charges + description: | + This endpoint lists all the unbilled charges. + operationId: list_unbilled_charges + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-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A-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: include_deleted + in: query + description: "If set to true, includes the deleted resources in the response.\ + \ For the deleted resources in the response, the 'deleted'\ + \ attribute will be 'true'." + required: false + style: form + explode: true + schema: + type: boolean + default: false + - name: is_voided + in: query + description: Will be true if the charge has been voided. Usually the unbilled + charge will be voided and revised to different charges(s) during proration. + required: false + deprecated: false + style: form + explode: true + schema: + type: boolean + deprecated: false + default: false + - name: subscription_id + in: query + description: "optional, string filter
A\ + \ unique identifier for the subscription this charge belongs to.
Supported\ + \ operators : is, is_not, starts_with, is_present, in, not_in

Example\ + \ subscription_id[is] = \"\ + 5hjdk8nOpd0b12\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: 5hjdk8nOpd0b12 + deprecated: false + - name: customer_id + in: query + description: "optional, string filter
A\ + \ unique identifier for the customer being charged.
Supported operators\ + \ : is, is_not, starts_with, is_present, in, not_in

Example\ + \ customer_id[is] = \"5hjdk8nOpd0b12\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: 5hjdk8nOpd0b12 + deprecated: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - unbilled_charge + type: object + properties: + unbilled_charge: + $ref: '#/components/schemas/UnbilledCharge' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + post: + summary: Create unbilled charges for item subscription + description: | + This endpoint creates unbilled charges for a subscription. + operationId: create_unbilled_charges_for_item_subscription + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?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F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - subscription_id + type: object + properties: + subscription_id: + maxLength: 50 + type: string + description: | + Identifier of the subscription for which this unbilled charges needs to be created. + deprecated: false + currency_code: + maxLength: 3 + type: string + description: | + The currency code (ISO 4217 format) of the unbilled_charge. + deprecated: false + item_prices: + type: object + properties: + item_price_id: + type: array + description: | + A unique ID for your system to identify the item price. + items: + maxLength: 100 + type: string + deprecated: false + quantity: + type: array + description: | + Item price quantity + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + unit_price: + type: array + description: | + The price or per-unit-price of the item price. By default, it is the [value set](/docs/api/item_prices#item_price_price) for the `item_price`. This is only applicable when the `pricing_model` of the `item_price` is `flat_fee` or `per_unit`. The value depends on the [type of currency](/docs/api/currencies#handling_currency_units). + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + unit_price_in_decimal: + type: array + description: | + The decimal representation of the price or per-unit price of the plan. The value is in major units of the currency. Always returned when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + date_from: + type: array + description: | + The time when the service period for the item starts. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + date_to: + type: array + description: | + The time when the service period for the item ends. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + description: | + Parameters for item_prices + deprecated: false + item_tiers: + type: object + properties: + item_price_id: + type: array + description: | + The id of the item price to which this tier belongs. + items: + maxLength: 100 + type: string + deprecated: false + starting_unit: + type: array + description: | + The lowest value in the quantity tier. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + ending_unit: + type: array + description: | + The highest value in the quantity tier. + items: + type: integer + format: int32 + deprecated: false + price: + type: array + description: | + The per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. The total cost for the item price when the `pricing_model` is `stairstep`. The value is in the minor unit of the currency. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + default: 0 + starting_unit_in_decimal: + type: array + description: | + The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal` of the next lower tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + ending_unit_in_decimal: + type: array + description: | + The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal` of the next higher tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + price_in_decimal: + type: array + description: | + The decimal representation of the per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. When the `pricing_model` is `stairstep`, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: | + Parameters for item_tiers + deprecated: false + charges: + type: object + properties: + amount: + type: array + description: | + The amount to be charged. The unit depends on the [type of currency](/docs/api?prod_cat_ver=1#md_disabled). + items: + minimum: 1 + type: integer + format: int64 + deprecated: false + amount_in_decimal: + type: array + description: | + The decimal representation of the amount for the [one-time charge](https://www.chargebee.com/docs/charges.html#one-time-charges ). Provide the value in major units of the currency. Can be provided only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units ) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: + type: array + description: | + Description for this charge + items: + maxLength: 250 + type: string + deprecated: false + taxable: + type: array + description: | + The amount to be charged is taxable or not. + items: + type: boolean + deprecated: false + default: true + tax_profile_id: + type: array + description: | + Tax profile of the charge. + items: + maxLength: 50 + type: string + deprecated: false + avalara_tax_code: + type: array + description: | + The Avalara tax codes to which items are mapped to should be provided here. Applicable only if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html). + items: + maxLength: 50 + type: string + deprecated: false + hsn_code: + type: array + description: | + The [HSN code](https://cbic-gst.gov.in/gst-goods-services-rates.html) to which the item is mapped for calculating the customer's tax in India. Applicable only when both of the following conditions are true: + + * **[India](https://www.chargebee.com/docs/indian-gst.html#configuring-indian-gst)** has been enabled as a **Tax Region**. (An error is returned when this condition is not true.) + * The [**AvaTax for Sales** integration](https://www.chargebee.com/docs/avalara.html) has been enabled in Chargebee. + items: + maxLength: 50 + type: string + deprecated: false + taxjar_product_code: + type: array + description: | + The TaxJar product codes to which items are mapped to should be provided here. Applicable only if you use Chargebee's [TaxJar integration](https://www.chargebee.com/docs/taxjar.html). + items: + maxLength: 50 + type: string + deprecated: false + avalara_sale_type: + type: array + items: + type: string + description: | + Indicates the type of sale carried out. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. \* wholesale - Transaction is a sale to another company that will resell your product or service to another consumer \* retail - Transaction is a sale to an end user \* consumed - Transaction is for an item that is consumed directly \* vendor_use - Transaction is for an item that is subject to vendor use tax + deprecated: false + enum: + - wholesale + - retail + - consumed + - vendor_use + avalara_transaction_type: + type: array + description: | + Indicates the type of product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. + items: + type: integer + format: int32 + deprecated: false + avalara_service_type: + type: array + description: | + Indicates the type of service for the product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. + items: + type: integer + format: int32 + deprecated: false + date_from: + type: array + description: | + The time when the service period for the charge starts. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + date_to: + type: array + description: | + The time when the service period for the charge ends. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + description: | + Parameters for charges + deprecated: false + tax_providers_fields: + type: object + properties: + provider_name: + type: array + items: + maxLength: 50 + type: string + deprecated: false + field_id: + type: array + items: + maxLength: 50 + type: string + deprecated: false + field_value: + type: array + items: + maxLength: 50 + type: string + deprecated: false + description: | + Parameters for tax_providers_fields + deprecated: false + encoding: + charges: + style: deepObject + explode: true + item_prices: + style: deepObject + explode: true + item_tiers: + style: deepObject + explode: true + tax_providers_fields: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - unbilled_charges + type: object + properties: + unbilled_charges: + type: array + items: + $ref: '#/components/schemas/UnbilledCharge' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /orders: + get: + summary: List orders + description: | + This API is used to retrieve a list of all the available orders. + operationId: list_orders + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(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(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: include_deleted + in: query + description: "If set to true, includes the deleted resources in the response.\ + \ For the deleted resources in the response, the 'deleted'\ + \ attribute will be 'true'." + required: false + style: form + explode: true + schema: + type: boolean + default: false + - name: exclude_deleted_credit_notes + in: query + description: Flag to indicate whether deleted credit notes should be passed + or not. + required: false + deprecated: false + style: form + explode: true + schema: + type: boolean + deprecated: false + - name: id + in: query + description: "optional, string filter
Uniquely\ + \ identifies the order. It is the api identifier for the order.
Supported\ + \ operators : is, is_not, starts_with, in, not_in

Example\ + \ id[is] = \"890\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: "890" + deprecated: false + - name: invoice_id + in: query + description: "optional, string filter
The\ + \ invoice number which acts as an identifier for invoice and is generated\ + \ sequentially.
Supported operators : is, is_not, starts_with,\ + \ in, not_in

Example invoice_id[is]\ + \ = \"INVOICE_982\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: INVOICE_982 + deprecated: false + - name: subscription_id + in: query + description: "optional, string filter
The\ + \ subscription for which the order is created.
Supported operators\ + \ : is, is_not, starts_with

Example subscription_id[is_not] = \"null\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + deprecated: false + example: null + - name: status + in: query + description: "optional, enumerated string filter
The\ + \ status of this order. Possible values are : new, processing, complete,\ + \ cancelled, voided, queued, awaiting_shipment, on_hold, delivered, shipped,\ + \ partially_delivered, returned.
Supported operators : is,\ + \ is_not, in, not_in

Example \ + \ status[is] = \"queued\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`new\` - Order has been created. Applicable only if you are using Chargebee's legacy order management system. \* \`processing\` - Order is being processed. Applicable only if you are using Chargebee's legacy order management system \* \`complete\` - Order has been processed successfully. Applicable only if you are using Chargebee's legacy order management system \* \`cancelled\` - Order has been cancelled. Applicable only if you are using Chargebee's legacy order management system \* \`voided\` - Order has been voided. Applicable only if you are using Chargebee's legacy order management system \* \`queued\` - Order is yet to be processed by any system, these are scheduled orders created by Chargebee \* \`awaiting_shipment\` - The order has been picked up by an integration system, and synced to a shipping management platform \* \`on_hold\` - The order is paused from being processed. \* \`delivered\` - The order has been delivered to the customer. \* \`shipped\` - The order has moved from order management system to a shipping system. \* \`partially_delivered\` - The order has been partially delivered to the customer. \* \`returned\` - The order has been returned after delivery. + enum: + - new + - processing + - complete + - cancelled + - voided + - queued + - awaiting_shipment + - on_hold + - delivered + - shipped + - partially_delivered + - returned + is_not: + type: string + description: | + \* \`new\` - Order has been created. Applicable only if you are using Chargebee's legacy order management system. \* \`processing\` - Order is being processed. Applicable only if you are using Chargebee's legacy order management system \* \`complete\` - Order has been processed successfully. Applicable only if you are using Chargebee's legacy order management system \* \`cancelled\` - Order has been cancelled. Applicable only if you are using Chargebee's legacy order management system \* \`voided\` - Order has been voided. Applicable only if you are using Chargebee's legacy order management system \* \`queued\` - Order is yet to be processed by any system, these are scheduled orders created by Chargebee \* \`awaiting_shipment\` - The order has been picked up by an integration system, and synced to a shipping management platform \* \`on_hold\` - The order is paused from being processed. \* \`delivered\` - The order has been delivered to the customer. \* \`shipped\` - The order has moved from order management system to a shipping system. \* \`partially_delivered\` - The order has been partially delivered to the customer. \* \`returned\` - The order has been returned after delivery. + enum: + - new + - processing + - complete + - cancelled + - voided + - queued + - awaiting_shipment + - on_hold + - delivered + - shipped + - partially_delivered + - returned + in: + pattern: "^\\[(new|processing|complete|cancelled|voided|queued|awaiting_shipment|on_hold|delivered|shipped|partially_delivered|returned)(,(new|processing|complete|cancelled|voided|queued|awaiting_shipment|on_hold|delivered|shipped|partially_delivered|returned))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(new|processing|complete|cancelled|voided|queued|awaiting_shipment|on_hold|delivered|shipped|partially_delivered|returned)(,(new|processing|complete|cancelled|voided|queued|awaiting_shipment|on_hold|delivered|shipped|partially_delivered|returned))*\\\ + ]$" + type: string + example: queued + deprecated: false + - name: shipping_date + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
This is the date on which the order will be delivered\ + \ to the customer.
Supported operators : after, before, on, between

Example\ + \ shipping_date[after] = \"\ + 1435054328\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1435054328" + deprecated: false + - name: shipped_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
The time at which the order was shipped.
Supported\ + \ operators : after, before, on, between

Example shipped_at[before] = \"1435054328\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1435054328" + deprecated: false + - name: order_type + in: query + description: "optional, enumerated string filter
Order\ + \ type. Possible values are : manual, system_generated.
Supported\ + \ operators : is, is_not, in, not_in

Example order_type[is_not] = \"system_generated\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`manual\` - The order has been created by the the user using Chargebee's legacy order management system. \* \`system_generated\` - The order has been created by Chargebee automatically based on the preferences set by the user. + enum: + - manual + - system_generated + is_not: + type: string + description: | + \* \`manual\` - The order has been created by the the user using Chargebee's legacy order management system. \* \`system_generated\` - The order has been created by Chargebee automatically based on the preferences set by the user. + enum: + - manual + - system_generated + in: + pattern: "^\\[(manual|system_generated)(,(manual|system_generated))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(manual|system_generated)(,(manual|system_generated))*\\\ + ]$" + type: string + example: system_generated + deprecated: false + - name: order_date + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
The date on which the order will start getting processed.
Supported\ + \ operators : after, before, on, between

Example order_date[before] = \"1435054328\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1435054328" + deprecated: false + - name: paid_on + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
The timestamp indicating the date & time the order's invoice\ + \ got paid.
Supported operators : after, before, on, between

Example\ + \ paid_on[on] = \"1435054328\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1435054328" + deprecated: false + - name: updated_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
To filter based on updated at .
Supported operators\ + \ : after, before, on, between

Example updated_at[on] = \"1243545465\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1243545465" + deprecated: false + - name: created_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
The time at which the order was created.
Supported\ + \ operators : after, before, on, between

Example created_at[after] = \"1435054328\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1435054328" + deprecated: false + - name: resent_status + in: query + description: "optional, enumerated string filter
Resent\ + \ order status. Possible values are : fully_resent, partially_resent.
Supported\ + \ operators : is, is_not, in, not_in

Example resent_status[is] = \"fully_resent\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`fully_resent\` - Order is Fully resent \* \`partially_resent\` - Order is Partially resent + enum: + - fully_resent + - partially_resent + is_not: + type: string + description: | + \* \`fully_resent\` - Order is Fully resent \* \`partially_resent\` - Order is Partially resent + enum: + - fully_resent + - partially_resent + in: + pattern: "^\\[(fully_resent|partially_resent)(,(fully_resent|partially_resent))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(fully_resent|partially_resent)(,(fully_resent|partially_resent))*\\\ + ]$" + type: string + example: fully_resent + deprecated: false + - name: is_resent + in: query + description: "optional, boolean filter
Order\ + \ is resent order or not. Possible values are : true, false
Supported\ + \ operators : is

Example \ + \ is_resent[is] = \"false\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + example: "false" + deprecated: false + - name: original_order_id + in: query + description: "optional, string filter
If\ + \ resent order what is the parent order id.
Supported operators :\ + \ is, is_not, starts_with

Example original_order_id[is] = \"1xRt6ifdr\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + example: 1xRt6ifdr + deprecated: false + - name: sort_by + in: query + description: "optional, string filter
Sorts\ + \ based on the specified attribute.
Supported attributes : created_at,\ + \ updated_at
Supported sort-orders : asc, desc

Example\ + \ sort_by[asc] = \"created_at\"\ +
This will sort the result based on the 'created_at' attribute in\ + \ ascending(earliest first) order." + required: false + style: deepObject + explode: true + schema: + minProperties: 1 + type: object + properties: + asc: + type: string + enum: + - created_at + - updated_at + desc: + type: string + enum: + - created_at + - updated_at + additionalProperties: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - order + type: object + properties: + order: + $ref: '#/components/schemas/Order' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + post: + summary: Create an order + description: | + #### Deprecated + + Chargebee no longer supports this endpoint, see [here](https://www.chargebee.com/docs/1.0/manual_orders_deprecate.html) for more information. Contact [Support](https://chargebee.freshdesk.com/support/home/) for additional assistance or if you have concerns about this update. + operationId: create_an_order + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})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:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - invoice_id + type: object + properties: + id: + maxLength: 40 + type: string + description: | + Uniquely identifies the order. If not given, this will be auto-generated. + deprecated: false + invoice_id: + maxLength: 50 + type: string + description: | + The invoice number which acts as an identifier for invoice and is generated sequentially. + deprecated: false + status: + type: string + description: | + The order status. \* cancelled - Order has been cancelled. Applicable only if you are using Chargebee's legacy order management system \* new - Order has been created. Applicable only if you are using Chargebee's legacy order management system. \* voided - Order has been voided. Applicable only if you are using Chargebee's legacy order management system \* complete - Order has been processed successfully. Applicable only if you are using Chargebee's legacy order management system \* processing - Order is being processed. Applicable only if you are using Chargebee's legacy order management system + deprecated: false + enum: + - new + - processing + - complete + - cancelled + - voided + reference_id: + maxLength: 50 + type: string + description: | + Reference id can be used to map the orders in the shipping/order management application to the orders in ChargeBee. The reference_id generally is same as the order id in the third party application. + deprecated: false + fulfillment_status: + maxLength: 50 + type: string + description: | + The fulfillment status of an order as reflected in the shipping/order management application. Typical statuses include Shipped,Awaiting Shipment,Not fulfilled etc;. + deprecated: false + note: + maxLength: 600 + type: string + description: | + The custom note for the order. + deprecated: false + tracking_id: + maxLength: 50 + type: string + description: | + The tracking id of the order. + deprecated: false + tracking_url: + maxLength: 255 + type: string + description: | + The tracking url of the order. + deprecated: false + batch_id: + maxLength: 50 + type: string + description: | + Unique id to identify a group of orders. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - order + type: object + properties: + order: + $ref: '#/components/schemas/Order' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /orders/import_order: + post: + summary: Import an order + description: | + Import an order for an invoice with one or more line items. The import order bulk operation is to be applied on an imported invoice. + operationId: import_an_order + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-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-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - created_at + - invoice_id + - order_date + - shipping_date + - status + type: object + properties: + id: + maxLength: 40 + type: string + description: "Uniquely identifies the order. It is the api identifier\ + \ for the order. \n\n*Order id will always be assigned incrementally\ + \ from the last generated Order ID.\n\n\nIf Orders imported has\ + \ an Order ID which is a string, Chargebee will just validate\ + \ if the Order ID is unique\n\nRecommendation: For orders being\ + \ imported, set the same prefix and the serial number that is\ + \ used for the Document number, which will make this into a string.\ + \ This will ensure that imported orders don't conflict with orders\ + \ created by Chargebee. Chargebee will ensure there aren't orders\ + \ with duplicate Order IDs.*.\n" + deprecated: false + document_number: + maxLength: 50 + type: string + description: "The order's serial number. \n\n*Document number\ + \ passed cannot be greater than the series mentioned in the configuration.\ + \ For instance, if you have set Document number series in Order\ + \ Configurations with a Prefix as 'ORDER' and Starting number\ + \ as '1000', orders up to the sequence number 'ORDER999' can be\ + \ imported into Chargebee* \n\n*Recommendation: Set a different\ + \ prefix at the Order Configuration, than the ones that are imported.\ + \ If your Order Configuration has a Prefix of 'NEW', with Starting\ + \ number as '1', i.e. 'NEW1', then, set Prefix for imported orders\ + \ to be as 'OLD', with Starting number as '1', i.e, 'OLD1'*.\n" + deprecated: false + invoice_id: + maxLength: 50 + type: string + description: | + The invoice number which acts as an identifier for invoice and is generated sequentially. + deprecated: false + status: + type: string + description: | + The status of this order. \* voided - Order has been voided. Applicable only if you are using Chargebee's legacy order management system \* complete - Order has been processed successfully. Applicable only if you are using Chargebee's legacy order management system \* shipped - The order has moved from order management system to a shipping system. \* processing - Order is being processed. Applicable only if you are using Chargebee's legacy order management system \* queued - Order is yet to be processed by any system, these are scheduled orders created by Chargebee \* on_hold - The order is paused from being processed. \* new - Order has been created. Applicable only if you are using Chargebee's legacy order management system. \* returned - The order has been returned after delivery. \* delivered - The order has been delivered to the customer. \* awaiting_shipment - The order has been picked up by an integration system, and synced to a shipping management platform \* cancelled - Order has been cancelled. Applicable only if you are using Chargebee's legacy order management system \* partially_delivered - The order has been partially delivered to the customer. + deprecated: false + enum: + - cancelled + - queued + - awaiting_shipment + - on_hold + - delivered + - shipped + - partially_delivered + - returned + subscription_id: + maxLength: 50 + type: string + description: | + The subscription for which the order is created. + deprecated: false + customer_id: + maxLength: 50 + type: string + description: | + The customer for which the order is created. + deprecated: false + created_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + The time at which the order was created. + format: unix-time + deprecated: false + order_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The date on which the order will start getting processed. + format: unix-time + deprecated: false + shipping_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + This is the date on which the order has to be shipped to the customer. + format: unix-time + deprecated: false + reference_id: + maxLength: 50 + type: string + description: "Reference id can be used to map the orders in the\ + \ shipping/order management application to the orders in ChargeBee.\ + \ The reference_id generally is the same as the order id in the\ + \ third party application. \n\n*Recommendation:\n\nIf this order\ + \ is in any of these statuses, awaiting_shipment, on_hold, delivered,\ + \ shipped, partially_delivered, returned, and has already been\ + \ processed, through a 3rd party system, and you have a reference\ + \ id of the entity in the 3rd party tool, pass in the entity id\ + \ to this field. If not, set the same prefix and the serial number\ + \ that is used for the Document number, which will make this into\ + \ a string.* \n\n*If this order hasn't been processed and is\ + \ in 'queued' status, do not pass any value to this field. Chargebee,\ + \ when it syncs your Orders through the fulfilment integrations\ + \ such as Shipstation or Shopify, would auto assign the reference\ + \ id from the connected system.*.\n" + deprecated: false + fulfillment_status: + maxLength: 50 + type: string + description: "The fulfillment status of an order as reflected in\ + \ the shipping/order management application. Typical statuses\ + \ include Shipped,Awaiting Shipment,Not fulfilled etc;. \n\n\ + *If this order is in any of these statuses, awaiting_shipment,\ + \ on_hold, delivered, shipped, partially_delivered, returned,\ + \ and has already been processed, through a 3rd party system,\ + \ and you have a corresponding status from the 3rd party tool,\ + \ pass in the status to this field.\n\nIf this order hasn't been\ + \ processed and is in 'queued' status, do not pass any value to\ + \ this field. Chargebee, when it syncs your Orders through the\ + \ fulfilment integrations such as Shipstation or Shopify, would\ + \ auto assign the fulfilment status from the connected system.*.\n" + deprecated: false + note: + maxLength: 600 + type: string + description: | + The custom note for the order. + deprecated: false + tracking_id: + maxLength: 50 + type: string + description: | + The tracking id of the order. + deprecated: false + tracking_url: + maxLength: 255 + type: string + description: | + The tracking url of the order. + deprecated: false + batch_id: + maxLength: 50 + type: string + description: | + Unique id to identify a group of orders. + deprecated: false + shipment_carrier: + maxLength: 50 + type: string + description: | + Shipment carrier. + deprecated: false + shipping_cut_off_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The time after which an order becomes unservicable. + format: unix-time + deprecated: false + delivered_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + The time at which the order was delivered. + format: unix-time + deprecated: false + shipped_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + The time at which the order was shipped. + format: unix-time + deprecated: false + cancelled_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + The time at which the order was cancelled. + format: unix-time + deprecated: false + cancellation_reason: + type: string + description: | + Cancellation reason. \* shipping_cut_off_passed - The invoice has been paid late and Chargebee cancel's the first order for the invoice. \* invoice_voided - The invoice for which the order was createed has been voided. \* alternative_found - Alternative found. \* others - Other reason \* order_resent - Order resent \* product_unsatisfactory - Product unsatisfactory. \* delivery_date_missed - Delivery date missed. \* subscription_cancelled - The subsctiption for which the order was created has been cancelled. \* fraudulent_transaction - Fraudulent transaction. \* invoice_written_off - The invoice has been completely written off. Orders are generated by Chargebee in cancelled state. \* product_not_required - Product not required. \* payment_declined - Payment declined. \* product_not_available - Product not available. \* third_party_cancellation - Third party cancellation. + deprecated: false + enum: + - shipping_cut_off_passed + - product_unsatisfactory + - third_party_cancellation + - product_not_required + - delivery_date_missed + - alternative_found + - invoice_written_off + - invoice_voided + - fraudulent_transaction + - payment_declined + - subscription_cancelled + - product_not_available + - others + - order_resent + refundable_credits_issued: + minimum: 0 + type: integer + description: | + If there are any credits that were issued at the order level, you can make use of the field, refundable_credits_issued. This will lead to Chargebee creating a Refundable Credit note against the order. When the next invoice is raised against the customer, this credit note will be utilised. + format: int64 + deprecated: false + shipping_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for shipping_address + deprecated: false + billing_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the billing contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the billing contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for billing_address + deprecated: false + encoding: + billing_address: + style: deepObject + explode: true + shipping_address: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - order + type: object + properties: + order: + $ref: '#/components/schemas/Order' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /orders/{order-id}/assign_order_number: + post: + summary: Assign order number + description: | + Assigns order number to the order based on the settings, if not already assigned + operationId: assign_order_number + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^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[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: order-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - order + type: object + properties: + order: + $ref: '#/components/schemas/Order' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /orders/{order-id}/resend: + post: + summary: Resend an order + description: | + Resend an existing order. This will help in resending an existing order in full or partial. Upto 5 resend operations are allowed per . When resent fully, the original order is canceled. + operationId: resend_an_order + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9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25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: order-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + shipping_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The date on which the order should be shipped to the customer. + format: unix-time + deprecated: false + resend_reason: + maxLength: 100 + type: string + description: | + Reason code for resending the order. Must be one from a list of reason codes set in the Chargebee app in **Settings \> Configure Chargebee \> Reason Codes \> Orders \> Order Resend**. Must be passed if set as mandatory in the app. The codes are case-sensitive. + deprecated: false + order_line_items: + type: object + properties: + id: + type: array + description: | + The identifier for the order line item. + items: + maxLength: 40 + type: string + deprecated: false + fulfillment_quantity: + type: array + description: | + The quantity that is going to get fulfilled for this order + items: + minimum: 0 + type: integer + format: int32 + deprecated: false + description: | + Parameters for order_line_items + deprecated: false + encoding: + order_line_items: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - order + type: object + properties: + order: + $ref: '#/components/schemas/Order' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /orders/{order-id}/reopen: + post: + summary: Reopen a cancelled order + description: | + This API is used to re-open a cancelled order + operationId: reopen_a_cancelled_order + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + p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))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: order-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + void_cancellation_credit_notes: + type: boolean + description: | + Flag to void credit notes created for cancellation if they are unused. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - order + type: object + properties: + order: + $ref: '#/components/schemas/Order' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /orders/{order-id}/cancel: + post: + summary: Cancel an order + description: | + Cancel order and create a refundable credit note for the order + operationId: cancel_an_order + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2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A-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: order-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - cancellation_reason + type: object + properties: + cancellation_reason: + type: string + description: | + Cancellation reason. \* shipping_cut_off_passed - The invoice has been paid late and Chargebee cancel's the first order for the invoice. \* alternative_found - Alternative found. \* others - Other reason \* product_unsatisfactory - Product unsatisfactory. \* product_not_required - Product not required. \* delivery_date_missed - Delivery date missed. \* invoice_voided - The invoice for which the order was createed has been voided. \* payment_declined - Payment declined. \* product_not_available - Product not available. \* subscription_cancelled - The subsctiption for which the order was created has been cancelled. \* third_party_cancellation - Third party cancellation. \* fraudulent_transaction - Fraudulent transaction. \* order_resent - Order resent \* invoice_written_off - The invoice has been completely written off. Orders are generated by Chargebee in cancelled state. + deprecated: false + enum: + - shipping_cut_off_passed + - product_unsatisfactory + - third_party_cancellation + - product_not_required + - delivery_date_missed + - alternative_found + - invoice_written_off + - invoice_voided + - fraudulent_transaction + - payment_declined + - subscription_cancelled + - product_not_available + - others + - order_resent + customer_notes: + maxLength: 2000 + type: string + description: | + The Customer Notes to be filled in the Credit Notes created to capture this refund detail. + deprecated: false + comment: + maxLength: 300 + type: string + description: | + Comment, if any, on the refund. + deprecated: false + cancelled_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + The time at which the order was cancelled. + format: unix-time + deprecated: false + credit_note: + type: object + properties: + total: + minimum: 0 + type: integer + description: | + Credit Note amount in cents. + format: int64 + deprecated: false + default: 0 + description: | + Parameters for credit_note + deprecated: false + encoding: + credit_note: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - order + type: object + properties: + order: + $ref: '#/components/schemas/Order' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /orders/{order-id}: + get: + summary: Retrieve an order + description: | + Retrieves an order corresponding to the order id passed. + operationId: retrieve_an_order + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?: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])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: order-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - order + type: object + properties: + order: + $ref: '#/components/schemas/Order' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + post: + summary: Update an order + description: | + Updates an order. If the status of an order is changed while updating the order, the status_update_at attribute is set with the current time. + operationId: update_an_order + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: order-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + reference_id: + maxLength: 50 + type: string + description: | + Reference id is the unique identifier of the order in the shipping/order management application. + deprecated: false + batch_id: + maxLength: 50 + type: string + description: | + Unique id to identify a group of orders. + deprecated: false + note: + maxLength: 600 + type: string + description: | + The custom note for the order. + deprecated: false + shipping_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The date on which the order should be shipped to the customer. + format: unix-time + deprecated: false + order_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The order date. + format: unix-time + deprecated: false + cancelled_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + The time at which the order was cancelled. + format: unix-time + deprecated: false + cancellation_reason: + type: string + description: | + Cancellation reason. \* shipping_cut_off_passed - The invoice has been paid late and Chargebee cancel's the first order for the invoice. \* invoice_voided - The invoice for which the order was createed has been voided. \* alternative_found - Alternative found. \* others - Other reason \* order_resent - Order resent \* product_unsatisfactory - Product unsatisfactory. \* delivery_date_missed - Delivery date missed. \* subscription_cancelled - The subsctiption for which the order was created has been cancelled. \* fraudulent_transaction - Fraudulent transaction. \* invoice_written_off - The invoice has been completely written off. Orders are generated by Chargebee in cancelled state. \* product_not_required - Product not required. \* payment_declined - Payment declined. \* product_not_available - Product not available. \* third_party_cancellation - Third party cancellation. + deprecated: false + enum: + - shipping_cut_off_passed + - product_unsatisfactory + - third_party_cancellation + - product_not_required + - delivery_date_missed + - alternative_found + - invoice_written_off + - invoice_voided + - fraudulent_transaction + - payment_declined + - subscription_cancelled + - product_not_available + - others + - order_resent + shipped_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + The time at which the order was shipped. + format: unix-time + deprecated: false + delivered_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + The time at which the order was delivered. + format: unix-time + deprecated: false + tracking_url: + maxLength: 255 + type: string + description: | + The tracking url of the order. + deprecated: false + tracking_id: + maxLength: 50 + type: string + description: | + The tracking id of the order. + deprecated: false + shipment_carrier: + maxLength: 50 + type: string + description: | + The carrier used to ship the goods to the customer. Ex:- FedEx. + deprecated: false + fulfillment_status: + maxLength: 50 + type: string + description: | + The fulfillment status of an order as reflected in the shipping/order management application. Typical statuses include Shipped,Awaiting Shipment,Not fulfilled etc;. + deprecated: false + status: + type: string + description: | + The order status. \* voided - Order has been voided. Applicable only if you are using Chargebee's legacy order management system \* complete - Order has been processed successfully. Applicable only if you are using Chargebee's legacy order management system \* shipped - The order has moved from order management system to a shipping system. \* processing - Order is being processed. Applicable only if you are using Chargebee's legacy order management system \* queued - Order is yet to be processed by any system, these are scheduled orders created by Chargebee \* on_hold - The order is paused from being processed. \* new - Order has been created. Applicable only if you are using Chargebee's legacy order management system. \* returned - The order has been returned after delivery. \* delivered - The order has been delivered to the customer. \* awaiting_shipment - The order has been picked up by an integration system, and synced to a shipping management platform \* cancelled - Order has been cancelled. Applicable only if you are using Chargebee's legacy order management system \* partially_delivered - The order has been partially delivered to the customer. + deprecated: false + default: new + enum: + - new + - processing + - complete + - cancelled + - voided + - queued + - awaiting_shipment + - on_hold + - delivered + - shipped + - partially_delivered + - returned + shipping_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for shipping_address + deprecated: false + order_line_items: + type: object + properties: + id: + type: array + description: | + The identifier for the order line item. + items: + maxLength: 40 + type: string + deprecated: false + status: + type: array + items: + type: string + description: | + The order line item's delivery status \* shipped - The order line item has been shipped. \* returned - The order has been returned after delivery. \* queued - Not processed for shipping yet. \* awaiting_shipment - Moved to shipping platform. \* on_hold - The delivery has been moved to "On hold" status. \* partially_delivered - The order has been partially delivered to the customer. \* cancelled - The order has been returned after delivery. \* delivered - The order line item has been delivered. + deprecated: false + default: queued + enum: + - queued + - awaiting_shipment + - on_hold + - delivered + - shipped + - partially_delivered + - returned + - cancelled + sku: + type: array + description: | + The SKU code for the order line item product + items: + maxLength: 250 + type: string + deprecated: false + description: | + Parameters for order_line_items + deprecated: false + encoding: + order_line_items: + style: deepObject + explode: true + shipping_address: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - order + type: object + properties: + order: + $ref: '#/components/schemas/Order' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /orders/{order-id}/delete: + post: + summary: Delete an imported order + description: | + Deletes only [Imported Order](#import_an_order) .Delete does not happen if the order was refunded. It goes through if order refund was initiated and is in "refund_due" state. + operationId: delete_an_imported_order + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: order-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - order + type: object + properties: + order: + $ref: '#/components/schemas/Order' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /orders/{order-id}/create_refundable_credit_note: + post: + summary: Create a refundable credit note + description: | + This API is used to create a refundable credit note for the order + operationId: create_a_refundable_credit_note + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[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9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: order-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + customer_notes: + maxLength: 2000 + type: string + description: | + The Customer Notes to be filled in the Credit Notes created to capture this refund detail. + deprecated: false + comment: + maxLength: 300 + type: string + description: | + Comment, if any, on the refund. + deprecated: false + credit_note: + required: + - reason_code + - total + type: object + properties: + reason_code: + type: string + description: | + The reason for issuing this Credit Note. The following reason codes are supported now\[Deprecated; use the [create_reason_code](/docs/api/credit_notes#credit_note_create_reason_code) parameter instead\] \* product_unsatisfactory - Product Unsatisfactory \* chargeback - Can be set when you are recording your customer Chargebacks \* service_unsatisfactory - Service Unsatisfactory \* write_off - This reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off) operation. \* subscription_change - This reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html) is enabled \* fraudulent - FRAUDULENT \* other - Can be set when none of the above reason codes are applicable \* subscription_pause - This reason will be automatically set to credit notes created during pause/resume subscription operation. \* waiver - Waiver \* order_cancellation - Order Cancellation \* order_change - Order Change \* subscription_cancellation - This reason will be set automatically for Credit Notes created during cancel subscription operation + deprecated: false + enum: + - write_off + - subscription_change + - subscription_cancellation + - subscription_pause + - chargeback + - product_unsatisfactory + - service_unsatisfactory + - order_change + - order_cancellation + - waiver + - other + - fraudulent + total: + minimum: 0 + type: integer + description: | + Credit Note amount in cents. + format: int64 + deprecated: false + default: 0 + description: | + Parameters for credit_note + deprecated: false + encoding: + credit_note: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - order + type: object + properties: + order: + $ref: '#/components/schemas/Order' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /gifts/create_for_items: + post: + summary: Create a gift subscription for items + description: | + Create a gift subscription with items like plans, addons, or charges and gift it to an existing customer. + operationId: create_a_gift_subscription_for_items + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|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:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + scheduled_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + Indicates the date on which the gift notification is sent to the receiver. If not passed, the receiver is notified immediately. + format: unix-time + deprecated: false + auto_claim: + type: boolean + description: | + When `true`, the claim happens automatically. When not passed, the default value in the site settings is used. + deprecated: false + default: false + no_expiry: + type: boolean + description: | + When `true`, indicates that the gift does not expire. Do not pass or pass as `false` when `auto_claim` is set. . + deprecated: false + claim_expiry_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The date until which the gift can be claimed. Must be set to a value after `scheduled_at`. If the gift is not claimed within `claim_expiry_date`, it will expire and the subscription will move to `cancelled` state. When not passed, the value specified in the site settings will be used. Pass as `NULL` or do not pass when `auto_claim` or `no_expiry` are set. + format: unix-time + deprecated: false + coupon_ids: + type: array + description: | + List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + gifter: + required: + - customer_id + - signature + type: object + properties: + customer_id: + maxLength: 50 + type: string + description: | + Gifter customer id. + deprecated: false + signature: + maxLength: 50 + type: string + description: | + Gifter sign-off name + deprecated: false + note: + maxLength: 500 + type: string + description: | + Personalized message for the gift. + deprecated: false + payment_src_id: + maxLength: 40 + type: string + description: | + Identifier of the payment source + deprecated: false + description: | + Parameters for gifter + deprecated: false + gift_receiver: + required: + - customer_id + - email + - first_name + - last_name + type: object + properties: + customer_id: + maxLength: 50 + type: string + description: | + Receiver customer id. + deprecated: false + first_name: + maxLength: 150 + type: string + description: | + First name of the receiver as given by the gifter. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + Last name of the receiver as given by the gifter, + deprecated: false + email: + maxLength: 70 + type: string + description: | + Email of the receiver. All gift related emails are sent to this email. + format: email + deprecated: false + description: | + Parameters for gift_receiver + deprecated: false + payment_intent: + type: object + properties: + id: + maxLength: 150 + type: string + description: | + Identifier for PaymentIntent generated by Chargebee.js. Applicable only when you are using Chargebee.js for completing the 3DS flow. The PaymentIntent should be in 'authorized' state while passing it here. You need not pass other PaymentIntent parameters if this is passed. + deprecated: false + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account used for performing the 3DS flow. + deprecated: false + gw_token: + maxLength: 65000 + type: string + description: | + Identifier for 3DS transaction/verification object at the gateway. Can be passed only after successfully completing the 3DS flow. Refer [3DS implementation in Chargebee](/docs/api/3ds_card_payments#3ds-gateway-side-implementation) to find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow. + deprecated: false + payment_method_type: + type: string + description: | + The list of payment method types (For example, card, ideal, sofort, bancontact, etc.) this Payment Intent is allowed to use. If payment method type is empty, Card is taken as the default type for all gateways except Razorpay. \* card - card \* netbanking_emandates - netbanking_emandates \* dotpay - dotpay \* faster_payments - Faster Payments \* upi - upi \* direct_debit - direct_debit \* sepa_instant_transfer - Sepa Instant Transfer \* bancontact - bancontact \* google_pay - google_pay \* apple_pay - apple_pay \* giropay - giropay \* paypal_express_checkout - paypal_express_checkout \* venmo - Venmo \* klarna_pay_now - Klarna Pay Now \* sofort - sofort \* amazon_payments - Amazon Payments \* ideal - ideal \* pay_to - PayTo \* boleto - boleto + deprecated: false + enum: + - card + - ideal + - sofort + - bancontact + - google_pay + - dotpay + - giropay + - apple_pay + - upi + - netbanking_emandates + - paypal_express_checkout + - direct_debit + - boleto + - venmo + - amazon_payments + - pay_to + - faster_payments + - sepa_instant_transfer + - klarna_pay_now + reference_id: + maxLength: 65000 + type: string + description: | + Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow. + deprecated: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`checkout_com\`: While adding a new payment method using \[permanent token\](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, \`document\` ID and \`country_of_residence\` are required to support payments through \[dLocal\](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). \* \`payer\`: User related information. \* \`country_of_residence\`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a \[two-character ISO code\](https://docs.checkout.com/resources/codes/country-codes). \* \`document\`: Document ID is the user's \[identification number\](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. \* \`bluesnap\`: While passing raw card details to BlueSnap, if \`fraud_session_id\` is added, \[additional validation\](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your \[BlueSnap fraud session ID\](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. \* \`braintree\`: While passing raw card details to Braintree, your \`fraud_merchant_id\` and the user's \`device_session_id\` can be added to perform \[additional validation\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`fraud_merchant_id\`: Your \[merchant ID\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. \* \`chargebee_payments\`: While passing raw card details to Chargebee Payments, if \`fraud_session_id\` is added, additional validation is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. \* \`bank_of_america\`: While passing raw card details to Bank of America, your user's \`device_session_id\` can be added to perform additional validation and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`ecentric\`: This parameter is used to verify and process payment method details in Ecentric. If the \`merchant_id\` parameter is included, Chargebee will vault it / perform a lookup and verification against this \`merchant_id\`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. \* \`merchant_id\`: Merchant GUID where the card is vaulted or need to be vaulted. \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries and \`device_session_id\` can be added to perform \[additional validation\](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device + deprecated: false + description: | + Parameters for payment_intent + deprecated: false + shipping_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for shipping_address + deprecated: false + subscription_items: + type: object + properties: + item_price_id: + type: array + description: | + The unique identifier of the item price. + items: + maxLength: 100 + type: string + deprecated: false + quantity: + type: array + description: | + The quantity of the item purchased + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + default: 1 + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + description: | + Parameters for subscription_items + deprecated: false + encoding: + gift_receiver: + style: deepObject + explode: true + gifter: + style: deepObject + explode: true + payment_intent: + style: deepObject + explode: true + shipping_address: + style: deepObject + explode: true + subscription_items: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - gift + - subscription + type: object + properties: + gift: + $ref: '#/components/schemas/Gift' + subscription: + $ref: '#/components/schemas/Subscription' + invoice: + $ref: '#/components/schemas/Invoice' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /gifts/{gift-id}/cancel: + post: + summary: Cancel a gift + description: | + This API allows to cancel gifts. Only gift in 'scheduled' and 'unclaimed' states can be cancelled. + operationId: cancel_a_gift + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ +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[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: gift-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - gift + - subscription + type: object + properties: + gift: + $ref: '#/components/schemas/Gift' + subscription: + $ref: '#/components/schemas/Subscription' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /gifts/{gift-id}/update_gift: + post: + summary: Update a gift + description: | + Change the date/time at which the gift notification email is to be sent. This only applies to gifts in the scheduled [status](https://apidocs.chargebee.com/docs/api/gifts#gift_status). + operationId: update_a_gift + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0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(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: gift-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - scheduled_at + type: object + properties: + scheduled_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + The new date/time at which the gift notification email is to be sent. The value must be greater than current time. If [no_expiry](https://apidocs.chargebee.com/docs/api/gifts#gift_no_expiry) is false then the value must also be less than [claim_expiry_date](https://apidocs.chargebee.com/docs/api/gifts#gift_claim_expiry_date). + format: unix-time + deprecated: false + comment: + maxLength: 250 + type: string + description: | + An internal comment for this action. The comments are not retrievable via API and are only available on request via [Chargebee Support](https://chargebee.freshdesk.com/support/home). + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - gift + - subscription + type: object + properties: + gift: + $ref: '#/components/schemas/Gift' + subscription: + $ref: '#/components/schemas/Subscription' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /gifts: + get: + summary: List gifts + description: | + Retrieves the list of gifts. + operationId: list_gifts + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9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1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: status + in: query + description: "optional, enumerated string filter
Status\ + \ of the gift. Possible values are : scheduled, unclaimed, claimed,\ + \ cancelled, expired.
Supported operators : is, is_not,\ + \ in, not_in

Example status[is]\ + \ = \"claimed\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`scheduled\` - Gift has been scheduled. \* \`unclaimed\` - Gift is not yet claimed and is ready to be claimed. \* \`claimed\` - Gift is claimed. \* \`cancelled\` - Gift is cancelled. \* \`expired\` - Gift is expired. + enum: + - scheduled + - unclaimed + - claimed + - cancelled + - expired + is_not: + type: string + description: | + \* \`scheduled\` - Gift has been scheduled. \* \`unclaimed\` - Gift is not yet claimed and is ready to be claimed. \* \`claimed\` - Gift is claimed. \* \`cancelled\` - Gift is cancelled. \* \`expired\` - Gift is expired. + enum: + - scheduled + - unclaimed + - claimed + - cancelled + - expired + in: + pattern: "^\\[(scheduled|unclaimed|claimed|cancelled|expired)(,(scheduled|unclaimed|claimed|cancelled|expired))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(scheduled|unclaimed|claimed|cancelled|expired)(,(scheduled|unclaimed|claimed|cancelled|expired))*\\\ + ]$" + type: string + example: claimed + deprecated: false + - name: gift_receiver + in: query + description: Parameters for gift_receiver + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + email: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + description: | + Email of the receiver. All gift related emails are sent to this email. + example: john@test.com + deprecated: false + customer_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + description: | + Receiver customer id. + example: 1xRt6ifdr + deprecated: false + deprecated: false + - name: gifter + in: query + description: Parameters for gifter + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + customer_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + description: | + Gifter customer id. + example: 1xRt6ifdr + deprecated: false + deprecated: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - gift + - subscription + type: object + properties: + gift: + $ref: '#/components/schemas/Gift' + subscription: + $ref: '#/components/schemas/Subscription' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /gifts/{gift-id}: + get: + summary: Retrieve a gift + description: | + Retrieves a gift subscription. This API accepts the gift 'id' and returns the gift along with the subscription. + operationId: retrieve_a_gift + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[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0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: gift-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - gift + - subscription + type: object + properties: + gift: + $ref: '#/components/schemas/Gift' + subscription: + $ref: '#/components/schemas/Subscription' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /gifts/{gift-id}/claim: + post: + summary: Claim a gift + description: | + Claiming a gift will move the status to 'claimed'. Only gifts in 'unclaimed' state can be claimed. + operationId: claim_a_gift + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]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?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: gift-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - gift + - subscription + type: object + properties: + gift: + $ref: '#/components/schemas/Gift' + subscription: + $ref: '#/components/schemas/Subscription' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /transactions/{transaction-id}/record_refund: + post: + summary: Record an offline refund + description: | + Records a refund made offline. Applicable only for `transaction`s of [type](transactions#transaction_type) = `payment`. + operationId: record_an_offline_refund + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?: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5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: transaction-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - date + - payment_method + type: object + properties: + amount: + minimum: 1 + type: integer + description: | + The amount to be recorded as refunded. Must not exceed [amount_unused](transactions#transaction_amount_unused). If not passed then all of [amount_unused](transactions#transaction_amount_unused) is recorded as refunded. + format: int64 + deprecated: false + payment_method: + type: string + description: | + The payment method used to make the refund. \* card - Card \* alipay - Alipay \* sofort - Sofort \* play_store - Play Store \* custom - Custom \* sepa_instant_transfer - Sepa Instant Transfer \* upi - upi \* venmo - Venmo \* ach_credit - ACH Credit \* amazon_payments - Amazon Payments \* apple_pay - Apple Pay \* ideal - IDEAL \* giropay - giropay \* boleto - boleto \* chargeback - Only applicable for a transaction of [type](transactions#transaction_type) = `refund`. This value is set by Chargebee when an automated [chargeback](https://www.chargebee.com/docs/chargeback.html#chargeback-process) occurs. You can also set this explicitly when [recording a refund](transactions#record_an_offline_refund). \* automated_bank_transfer - Automated Bank Transfer \* wechat_pay - WeChat Pay \* sepa_credit - SEPA Credit \* google_pay - Google Pay \* cash - Cash \* netbanking_emandates - netbanking_emandates \* unionpay - Unionpay \* bancontact - Bancontact \* faster_payments - Faster Payments \* pay_to - PayTo \* bank_transfer - Bank Transfer \* paypal_express_checkout - Paypal Express Checkout \* app_store - App Store \* check - Check \* direct_debit - Direct Debit \* klarna_pay_now - Klarna Pay Now \* dotpay - Dotpay \* other - Payment Methods other than the above types + deprecated: false + enum: + - cash + - check + - chargeback + - bank_transfer + - other + - custom + date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The date when the refund was made. + format: unix-time + deprecated: false + reference_number: + maxLength: 100 + type: string + description: | + The reference number for this transaction. For example, the check number when `payment_method` = `check`. + deprecated: false + custom_payment_method_id: + maxLength: 50 + type: string + description: | + Identifier of the custom payment method of this transaction. + deprecated: false + comment: + maxLength: 300 + type: string + description: | + Remarks, if any, on the refund. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - transaction + type: object + properties: + transaction: + $ref: '#/components/schemas/Transaction' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /transactions: + get: + summary: List transactions + description: | + Lists all the transactions. + operationId: list_transactions + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0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-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: include_deleted + in: query + description: "If set to true, includes the deleted resources in the response.\ + \ For the deleted resources in the response, the 'deleted'\ + \ attribute will be 'true'." + required: false + style: form + explode: true + schema: + type: boolean + default: false + - name: id + in: query + description: "optional, string filter
Uniquely\ + \ identifies the transaction.
Supported operators : is, is_not,\ + \ starts_with, in, not_in

Example id[is] = \"txn_88ybdbsnvf2\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: txn_88ybdbsnvf2 + deprecated: false + - name: customer_id + in: query + description: "optional, string filter
Identifier\ + \ of the customer for which this transaction is made.
Supported operators\ + \ : is, is_not, starts_with, is_present, in, not_in

Example\ + \ customer_id[is] = \"5hjdk8nOpd\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: 5hjdk8nOpd + deprecated: false + - name: subscription_id + in: query + description: "optional, string filter
Identifier\ + \ of the subscription for which this transaction is made.
Supported\ + \ operators : is, is_not, starts_with, is_present, in, not_in

Example\ + \ subscription_id[is] = \"\ + 5hjdk8nOpd\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: 5hjdk8nOpd + deprecated: false + - name: payment_source_id + in: query + description: "optional, string filter
To\ + \ filter based on Transaction payment source id.
Supported operators\ + \ : is, is_not, starts_with, is_present, in, not_in

Example\ + \ payment_source_id[is] =\ + \ \"pm_3Nl8XXUQUXDVFa2\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: pm_3Nl8XXUQUXDVFa2 + deprecated: false + - name: payment_method + in: query + description: "optional, enumerated string filter
The\ + \ payment method of this transaction. Possible values are : card, cash,\ + \ check, chargeback, bank_transfer, amazon_payments, paypal_express_checkout,\ + \ direct_debit, alipay, unionpay, apple_pay, wechat_pay, ach_credit, sepa_credit,\ + \ ideal, google_pay, sofort, bancontact, giropay, dotpay, other, upi, netbanking_emandates.
Supported\ + \ operators : is, is_not, in, not_in

Example payment_method[is_not] = \"card\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`card\` - Card \* \`cash\` - Cash \* \`check\` - Check \* \`chargeback\` - Only applicable for a transaction of [type](transactions#transaction_type) = `refund`. This value is set by Chargebee when an automated [chargeback](https://www.chargebee.com/docs/chargeback.html#chargeback-process) occurs. You can also set this explicitly when [recording a refund](transactions#record_an_offline_refund). \* \`bank_transfer\` - Bank Transfer \* \`amazon_payments\` - Amazon Payments \* \`paypal_express_checkout\` - Paypal Express Checkout \* \`direct_debit\` - Direct Debit \* \`alipay\` - Alipay \* \`unionpay\` - Unionpay \* \`apple_pay\` - Apple Pay \* \`wechat_pay\` - WeChat Pay \* \`ach_credit\` - ACH Credit \* \`sepa_credit\` - SEPA Credit \* \`ideal\` - IDEAL \* \`google_pay\` - Google Pay \* \`sofort\` - Sofort \* \`bancontact\` - Bancontact \* \`giropay\` - giropay \* \`dotpay\` - Dotpay \* \`other\` - Payment Methods other than the above types \* \`app_store\` - \*\*(Deprecated)\*\* App Store \* \`upi\` - upi \* \`netbanking_emandates\` - netbanking_emandates \* \`play_store\` - \*\*(Deprecated)\*\* Play Store \* \`custom\` - Custom \* \`boleto\` - boleto \* \`venmo\` - Venmo \* \`pay_to\` - PayTo \* \`faster_payments\` - Faster Payments \* \`sepa_instant_transfer\` - Sepa Instant Transfer \* \`automated_bank_transfer\` - Automated Bank Transfer \* \`klarna_pay_now\` - Klarna Pay Now + enum: + - card + - cash + - check + - chargeback + - bank_transfer + - amazon_payments + - paypal_express_checkout + - direct_debit + - alipay + - unionpay + - apple_pay + - wechat_pay + - ach_credit + - sepa_credit + - ideal + - google_pay + - sofort + - bancontact + - giropay + - dotpay + - other + - upi + - netbanking_emandates + - custom + - boleto + - venmo + - pay_to + - faster_payments + - sepa_instant_transfer + - automated_bank_transfer + - klarna_pay_now + is_not: + type: string + description: | + \* \`card\` - Card \* \`cash\` - Cash \* \`check\` - Check \* \`chargeback\` - Only applicable for a transaction of [type](transactions#transaction_type) = `refund`. This value is set by Chargebee when an automated [chargeback](https://www.chargebee.com/docs/chargeback.html#chargeback-process) occurs. You can also set this explicitly when [recording a refund](transactions#record_an_offline_refund). \* \`bank_transfer\` - Bank Transfer \* \`amazon_payments\` - Amazon Payments \* \`paypal_express_checkout\` - Paypal Express Checkout \* \`direct_debit\` - Direct Debit \* \`alipay\` - Alipay \* \`unionpay\` - Unionpay \* \`apple_pay\` - Apple Pay \* \`wechat_pay\` - WeChat Pay \* \`ach_credit\` - ACH Credit \* \`sepa_credit\` - SEPA Credit \* \`ideal\` - IDEAL \* \`google_pay\` - Google Pay \* \`sofort\` - Sofort \* \`bancontact\` - Bancontact \* \`giropay\` - giropay \* \`dotpay\` - Dotpay \* \`other\` - Payment Methods other than the above types \* \`app_store\` - \*\*(Deprecated)\*\* App Store \* \`upi\` - upi \* \`netbanking_emandates\` - netbanking_emandates \* \`play_store\` - \*\*(Deprecated)\*\* Play Store \* \`custom\` - Custom \* \`boleto\` - boleto \* \`venmo\` - Venmo \* \`pay_to\` - PayTo \* \`faster_payments\` - Faster Payments \* \`sepa_instant_transfer\` - Sepa Instant Transfer \* \`automated_bank_transfer\` - Automated Bank Transfer \* \`klarna_pay_now\` - Klarna Pay Now + enum: + - card + - cash + - check + - chargeback + - bank_transfer + - amazon_payments + - paypal_express_checkout + - direct_debit + - alipay + - unionpay + - apple_pay + - wechat_pay + - ach_credit + - sepa_credit + - ideal + - google_pay + - sofort + - bancontact + - giropay + - dotpay + - other + - upi + - netbanking_emandates + - custom + - boleto + - venmo + - pay_to + - faster_payments + - sepa_instant_transfer + - automated_bank_transfer + - klarna_pay_now + in: + pattern: "^\\[(card|cash|check|chargeback|bank_transfer|amazon_payments|paypal_express_checkout|direct_debit|alipay|unionpay|apple_pay|wechat_pay|ach_credit|sepa_credit|ideal|google_pay|sofort|bancontact|giropay|dotpay|other|app_store|upi|netbanking_emandates|play_store|custom|boleto|venmo|pay_to|faster_payments|sepa_instant_transfer|automated_bank_transfer|klarna_pay_now)(,(card|cash|check|chargeback|bank_transfer|amazon_payments|paypal_express_checkout|direct_debit|alipay|unionpay|apple_pay|wechat_pay|ach_credit|sepa_credit|ideal|google_pay|sofort|bancontact|giropay|dotpay|other|app_store|upi|netbanking_emandates|play_store|custom|boleto|venmo|pay_to|faster_payments|sepa_instant_transfer|automated_bank_transfer|klarna_pay_now))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(card|cash|check|chargeback|bank_transfer|amazon_payments|paypal_express_checkout|direct_debit|alipay|unionpay|apple_pay|wechat_pay|ach_credit|sepa_credit|ideal|google_pay|sofort|bancontact|giropay|dotpay|other|app_store|upi|netbanking_emandates|play_store|custom|boleto|venmo|pay_to|faster_payments|sepa_instant_transfer|automated_bank_transfer|klarna_pay_now)(,(card|cash|check|chargeback|bank_transfer|amazon_payments|paypal_express_checkout|direct_debit|alipay|unionpay|apple_pay|wechat_pay|ach_credit|sepa_credit|ideal|google_pay|sofort|bancontact|giropay|dotpay|other|app_store|upi|netbanking_emandates|play_store|custom|boleto|venmo|pay_to|faster_payments|sepa_instant_transfer|automated_bank_transfer|klarna_pay_now))*\\\ + ]$" + type: string + example: card + deprecated: false + - name: gateway + in: query + description: "optional, enumerated string filter
Gateway\ + \ through which this transaction was done. Applicable only for 'Card' Payment\ + \ Method. Possible values are : chargebee, chargebee_payments, stripe,\ + \ wepay, braintree, authorize_net, paypal_pro, pin, eway, eway_rapid, worldpay,\ + \ balanced_payments, beanstream, bluepay, elavon, first_data_global, hdfc,\ + \ migs, nmi, ogone, paymill, paypal_payflow_pro, sage_pay, tco, wirecard,\ + \ amazon_payments, paypal_express_checkout, gocardless, adyen, orbital,\ + \ moneris_us, moneris, bluesnap, cybersource, vantiv, checkout_com, paypal,\ + \ ingenico_direct, exact, mollie, quickbooks, razorpay, not_applicable.
Supported\ + \ operators : is, is_not, in, not_in

Example gateway[is] = \"stripe\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`chargebee\` - Chargebee test gateway. \* \`chargebee_payments\` - Chargebee Payments gateway \* \`stripe\` - Stripe is a payment gateway. \* \`wepay\` - WePay is a payment gateway. \* \`braintree\` - Braintree is a payment gateway. \* \`authorize_net\` - Authorize.net is a payment gateway \* \`paypal_pro\` - PayPal Pro Account is a payment gateway. \* \`pin\` - Pin is a payment gateway \* \`eway\` - eWAY Account is a payment gateway. \* \`eway_rapid\` - eWAY Rapid is a payment gateway. \* \`worldpay\` - WorldPay is a payment gateway \* \`balanced_payments\` - Balanced is a payment gateway \* \`beanstream\` - Bambora(formerly known as Beanstream) is a payment gateway. \* \`bluepay\` - BluePay is a payment gateway. \* \`elavon\` - Elavon Virtual Merchant is a payment solution. \* \`first_data_global\` - First Data Global Gateway Virtual Terminal Account \* \`hdfc\` - HDFC Account is a payment gateway. \* \`migs\` - MasterCard Internet Gateway Service payment gateway. \* \`nmi\` - NMI is a payment gateway. \* \`ogone\` - Ingenico ePayments (formerly known as Ogone) is a payment gateway. \* \`paymill\` - PAYMILL is a payment gateway. \* \`paypal_payflow_pro\` - PayPal Payflow Pro is a payment gateway. \* \`sage_pay\` - Sage Pay is a payment gateway. \* \`tco\` - 2Checkout is a payment gateway. \* \`wirecard\` - WireCard Account is a payment service provider. \* \`amazon_payments\` - Amazon Payments is a payment service provider. \* \`paypal_express_checkout\` - PayPal Express Checkout is a payment gateway. \* \`gocardless\` - GoCardless is a payment service provider. \* \`adyen\` - Adyen is a payment gateway. \* \`orbital\` - Chase Paymentech(Orbital) is a payment gateway. \* \`moneris_us\` - Moneris USA is a payment gateway. \* \`moneris\` - Moneris is a payment gateway. \* \`bluesnap\` - BlueSnap is a payment gateway. \* \`cybersource\` - CyberSource is a payment gateway. \* \`vantiv\` - Vantiv is a payment gateway. \* \`checkout_com\` - Checkout.com is a payment gateway. \* \`paypal\` - PayPal Commerce is a payment gateway. \* \`ingenico_direct\` - Worldline Online Payments is a payment gateway. \* \`exact\` - Exact Payments is a payment gateway. \* \`mollie\` - Mollie is a payment gateway. \* \`quickbooks\` - Intuit QuickBooks Payments gateway \* \`razorpay\` - Razorpay is a fast growing payment service provider in India working with all leading banks and support for major local payment methods including Netbanking, UPI etc. \* \`global_payments\` - Global Payments is a payment service provider. \* \`bank_of_america\` - Bank of America Gateway \* \`ecentric\` - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities. \* \`metrics_global\` - Metrics global is a leading payment service provider providing unified payment services in the US. \* \`windcave\` - Windcave provides an end to end payment processing solution in ANZ and other leading global markets. \* \`pay_com\` - Pay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes. \* \`ebanx\` - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion. \* \`dlocal\` - Dlocal provides payment solutions for global commerce by accepting local payment methods. \* \`nuvei\` - Nuvei is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. \* \`not_applicable\` - Indicates that payment gateway is not applicable for this resource. + enum: + - chargebee + - chargebee_payments + - stripe + - wepay + - braintree + - authorize_net + - paypal_pro + - pin + - eway + - eway_rapid + - worldpay + - balanced_payments + - beanstream + - bluepay + - elavon + - first_data_global + - hdfc + - migs + - nmi + - ogone + - paymill + - paypal_payflow_pro + - sage_pay + - tco + - wirecard + - amazon_payments + - paypal_express_checkout + - gocardless + - adyen + - orbital + - moneris_us + - moneris + - bluesnap + - cybersource + - vantiv + - checkout_com + - paypal + - ingenico_direct + - exact + - mollie + - quickbooks + - razorpay + - global_payments + - bank_of_america + - ecentric + - metrics_global + - windcave + - pay_com + - ebanx + - dlocal + - nuvei + - not_applicable + is_not: + type: string + description: | + \* \`chargebee\` - Chargebee test gateway. \* \`chargebee_payments\` - Chargebee Payments gateway \* \`stripe\` - Stripe is a payment gateway. \* \`wepay\` - WePay is a payment gateway. \* \`braintree\` - Braintree is a payment gateway. \* \`authorize_net\` - Authorize.net is a payment gateway \* \`paypal_pro\` - PayPal Pro Account is a payment gateway. \* \`pin\` - Pin is a payment gateway \* \`eway\` - eWAY Account is a payment gateway. \* \`eway_rapid\` - eWAY Rapid is a payment gateway. \* \`worldpay\` - WorldPay is a payment gateway \* \`balanced_payments\` - Balanced is a payment gateway \* \`beanstream\` - Bambora(formerly known as Beanstream) is a payment gateway. \* \`bluepay\` - BluePay is a payment gateway. \* \`elavon\` - Elavon Virtual Merchant is a payment solution. \* \`first_data_global\` - First Data Global Gateway Virtual Terminal Account \* \`hdfc\` - HDFC Account is a payment gateway. \* \`migs\` - MasterCard Internet Gateway Service payment gateway. \* \`nmi\` - NMI is a payment gateway. \* \`ogone\` - Ingenico ePayments (formerly known as Ogone) is a payment gateway. \* \`paymill\` - PAYMILL is a payment gateway. \* \`paypal_payflow_pro\` - PayPal Payflow Pro is a payment gateway. \* \`sage_pay\` - Sage Pay is a payment gateway. \* \`tco\` - 2Checkout is a payment gateway. \* \`wirecard\` - WireCard Account is a payment service provider. \* \`amazon_payments\` - Amazon Payments is a payment service provider. \* \`paypal_express_checkout\` - PayPal Express Checkout is a payment gateway. \* \`gocardless\` - GoCardless is a payment service provider. \* \`adyen\` - Adyen is a payment gateway. \* \`orbital\` - Chase Paymentech(Orbital) is a payment gateway. \* \`moneris_us\` - Moneris USA is a payment gateway. \* \`moneris\` - Moneris is a payment gateway. \* \`bluesnap\` - BlueSnap is a payment gateway. \* \`cybersource\` - CyberSource is a payment gateway. \* \`vantiv\` - Vantiv is a payment gateway. \* \`checkout_com\` - Checkout.com is a payment gateway. \* \`paypal\` - PayPal Commerce is a payment gateway. \* \`ingenico_direct\` - Worldline Online Payments is a payment gateway. \* \`exact\` - Exact Payments is a payment gateway. \* \`mollie\` - Mollie is a payment gateway. \* \`quickbooks\` - Intuit QuickBooks Payments gateway \* \`razorpay\` - Razorpay is a fast growing payment service provider in India working with all leading banks and support for major local payment methods including Netbanking, UPI etc. \* \`global_payments\` - Global Payments is a payment service provider. \* \`bank_of_america\` - Bank of America Gateway \* \`ecentric\` - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities. \* \`metrics_global\` - Metrics global is a leading payment service provider providing unified payment services in the US. \* \`windcave\` - Windcave provides an end to end payment processing solution in ANZ and other leading global markets. \* \`pay_com\` - Pay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes. \* \`ebanx\` - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion. \* \`dlocal\` - Dlocal provides payment solutions for global commerce by accepting local payment methods. \* \`nuvei\` - Nuvei is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. \* \`not_applicable\` - Indicates that payment gateway is not applicable for this resource. + enum: + - chargebee + - chargebee_payments + - stripe + - wepay + - braintree + - authorize_net + - paypal_pro + - pin + - eway + - eway_rapid + - worldpay + - balanced_payments + - beanstream + - bluepay + - elavon + - first_data_global + - hdfc + - migs + - nmi + - ogone + - paymill + - paypal_payflow_pro + - sage_pay + - tco + - wirecard + - amazon_payments + - paypal_express_checkout + - gocardless + - adyen + - orbital + - moneris_us + - moneris + - bluesnap + - cybersource + - vantiv + - checkout_com + - paypal + - ingenico_direct + - exact + - mollie + - quickbooks + - razorpay + - global_payments + - bank_of_america + - ecentric + - metrics_global + - windcave + - pay_com + - ebanx + - dlocal + - nuvei + - not_applicable + in: + pattern: "^\\[(chargebee|chargebee_payments|stripe|wepay|braintree|authorize_net|paypal_pro|pin|eway|eway_rapid|worldpay|balanced_payments|beanstream|bluepay|elavon|first_data_global|hdfc|migs|nmi|ogone|paymill|paypal_payflow_pro|sage_pay|tco|wirecard|amazon_payments|paypal_express_checkout|gocardless|adyen|orbital|moneris_us|moneris|bluesnap|cybersource|vantiv|checkout_com|paypal|ingenico_direct|exact|mollie|quickbooks|razorpay|global_payments|bank_of_america|ecentric|metrics_global|windcave|pay_com|ebanx|dlocal|nuvei|not_applicable)(,(chargebee|chargebee_payments|stripe|wepay|braintree|authorize_net|paypal_pro|pin|eway|eway_rapid|worldpay|balanced_payments|beanstream|bluepay|elavon|first_data_global|hdfc|migs|nmi|ogone|paymill|paypal_payflow_pro|sage_pay|tco|wirecard|amazon_payments|paypal_express_checkout|gocardless|adyen|orbital|moneris_us|moneris|bluesnap|cybersource|vantiv|checkout_com|paypal|ingenico_direct|exact|mollie|quickbooks|razorpay|global_payments|bank_of_america|ecentric|metrics_global|windcave|pay_com|ebanx|dlocal|nuvei|not_applicable))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(chargebee|chargebee_payments|stripe|wepay|braintree|authorize_net|paypal_pro|pin|eway|eway_rapid|worldpay|balanced_payments|beanstream|bluepay|elavon|first_data_global|hdfc|migs|nmi|ogone|paymill|paypal_payflow_pro|sage_pay|tco|wirecard|amazon_payments|paypal_express_checkout|gocardless|adyen|orbital|moneris_us|moneris|bluesnap|cybersource|vantiv|checkout_com|paypal|ingenico_direct|exact|mollie|quickbooks|razorpay|global_payments|bank_of_america|ecentric|metrics_global|windcave|pay_com|ebanx|dlocal|nuvei|not_applicable)(,(chargebee|chargebee_payments|stripe|wepay|braintree|authorize_net|paypal_pro|pin|eway|eway_rapid|worldpay|balanced_payments|beanstream|bluepay|elavon|first_data_global|hdfc|migs|nmi|ogone|paymill|paypal_payflow_pro|sage_pay|tco|wirecard|amazon_payments|paypal_express_checkout|gocardless|adyen|orbital|moneris_us|moneris|bluesnap|cybersource|vantiv|checkout_com|paypal|ingenico_direct|exact|mollie|quickbooks|razorpay|global_payments|bank_of_america|ecentric|metrics_global|windcave|pay_com|ebanx|dlocal|nuvei|not_applicable))*\\\ + ]$" + type: string + example: stripe + deprecated: false + - name: gateway_account_id + in: query + description: "optional, string filter
The\ + \ gateway account used for this transaction.
Supported operators :\ + \ is, is_not, starts_with, in, not_in

Example gateway_account_id[is] = \"gw_3Nl9BNeQ7438Ks1\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: gw_3Nl9BNeQ7438Ks1 + deprecated: false + - name: id_at_gateway + in: query + description: "optional, string filter
The\ + \ id with which this transaction is referred in gateway.
Supported\ + \ operators : is, is_not, starts_with

Example id_at_gateway[is_not] = \"txn_5678HJS89900\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + example: txn_5678HJS89900 + deprecated: false + - name: reference_number + in: query + description: "optional, string filter
The\ + \ reference number for this transaction. For example, the check number when\ + \ payment_method\ + \ = check.
Supported operators : is, is_not, starts_with,\ + \ is_present

Example reference_number[is]\ + \ = \"cus_u239732\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + example: cus_u239732 + deprecated: false + - name: type + in: query + description: "optional, enumerated string filter
Type\ + \ of the transaction. Possible values are : authorization, payment,\ + \ refund, payment_reversal.
Supported operators : is, is_not,\ + \ in, not_in

Example type[is_not]\ + \ = \"payment\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`authorization\` - The transaction represents an authorization for capturing the [amount](transactions#transaction_amount) from the customer's [payment_source](payment_sources). \* \`payment\` - The transaction represents capture of [amount](transactions#transaction_amount) from the customer's [payment_source](payment_sources). \* \`refund\` - The transaction represents a refund of [amount](transactions#transaction_amount) to the customer's [payment_source](payment_sources). \* \`payment_reversal\` - Indicates a reversal transaction. + enum: + - authorization + - payment + - refund + - payment_reversal + is_not: + type: string + description: | + \* \`authorization\` - The transaction represents an authorization for capturing the [amount](transactions#transaction_amount) from the customer's [payment_source](payment_sources). \* \`payment\` - The transaction represents capture of [amount](transactions#transaction_amount) from the customer's [payment_source](payment_sources). \* \`refund\` - The transaction represents a refund of [amount](transactions#transaction_amount) to the customer's [payment_source](payment_sources). \* \`payment_reversal\` - Indicates a reversal transaction. + enum: + - authorization + - payment + - refund + - payment_reversal + in: + pattern: "^\\[(authorization|payment|refund|payment_reversal)(,(authorization|payment|refund|payment_reversal))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(authorization|payment|refund|payment_reversal)(,(authorization|payment|refund|payment_reversal))*\\\ + ]$" + type: string + example: payment + deprecated: false + - name: date + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
Indicates when this transaction occurred.
Supported\ + \ operators : after, before, on, between

Example date[before] = \"1435054328\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1435054328" + deprecated: false + - name: amount + in: query + description: "optional, in cents filter
Amount\ + \ for this transaction.
Supported operators : is, is_not, lt,\ + \ lte, gt, gte, between

Example amount[gt] = \"1200\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + example: "1200" + deprecated: false + - name: amount_capturable + in: query + description: "optional, in cents filter
To\ + \ filter based on transaction’s unused authorized/blocked amount.
Supported\ + \ operators : is, is_not, lt, lte, gt, gte, between

Example\ + \ amount_capturable[lt] =\ + \ \"1200\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + example: "1200" + deprecated: false + - name: status + in: query + description: "optional, enumerated string filter
The\ + \ status of this transaction. Possible values are : in_progress, success,\ + \ voided, failure, timeout, needs_attention.
Supported operators\ + \ : is, is_not, in, not_in

Example status[is] = \"success\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`in_progress\` - Transaction is being processed by the gateway. This typically happens for [direct debit transactions](https://www.chargebee.com/docs/direct-debit-payments.html) or, in case of cards, refund transactions. Such transactions can take 2-7 days to complete, depending on the gateway and payment method. \* \`success\` - The transaction is successful. \* \`voided\` - The transaction got voided or authorization expired at gateway. \* \`failure\` - Transaction failed. Refer the 'error_code' and 'error_text' fields to know the reason for failure \* \`timeout\` - Transaction failed because of Gateway not accepting the connection. \* \`needs_attention\` - Connection with Gateway got terminated abruptly. So, status of this transaction needs to be resolved manually + enum: + - in_progress + - success + - voided + - failure + - timeout + - needs_attention + is_not: + type: string + description: | + \* \`in_progress\` - Transaction is being processed by the gateway. This typically happens for [direct debit transactions](https://www.chargebee.com/docs/direct-debit-payments.html) or, in case of cards, refund transactions. Such transactions can take 2-7 days to complete, depending on the gateway and payment method. \* \`success\` - The transaction is successful. \* \`voided\` - The transaction got voided or authorization expired at gateway. \* \`failure\` - Transaction failed. Refer the 'error_code' and 'error_text' fields to know the reason for failure \* \`timeout\` - Transaction failed because of Gateway not accepting the connection. \* \`needs_attention\` - Connection with Gateway got terminated abruptly. So, status of this transaction needs to be resolved manually + enum: + - in_progress + - success + - voided + - failure + - timeout + - needs_attention + in: + pattern: "^\\[(in_progress|success|voided|failure|timeout|needs_attention)(,(in_progress|success|voided|failure|timeout|needs_attention))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(in_progress|success|voided|failure|timeout|needs_attention)(,(in_progress|success|voided|failure|timeout|needs_attention))*\\\ + ]$" + type: string + example: success + deprecated: false + - name: updated_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
To filter based on updated_at. This attribute\ + \ will be present only if the resource has been updated after 2016-09-28.\ + \ It is advisable when using this filter, to pass the sort_by\ + \ input parameter as updated_at for a faster response.
Supported\ + \ operators : after, before, on, between

Example updated_at[after] = \"1243545465\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1243545465" + deprecated: false + - name: sort_by + in: query + description: "optional, string filter
Sorts\ + \ based on the specified attribute.
Supported attributes : date,\ + \ updated_at
Supported sort-orders : asc, desc

Example\ + \ sort_by[asc] = \"date\"\ +
This will sort the result based on the 'date' attribute in ascending(earliest\ + \ first) order." + required: false + style: deepObject + explode: true + schema: + minProperties: 1 + type: object + properties: + asc: + type: string + enum: + - date + - updated_at + desc: + type: string + enum: + - date + - updated_at + additionalProperties: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - transaction + type: object + properties: + transaction: + $ref: '#/components/schemas/Transaction' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /transactions/{transaction-id}/void: + post: + summary: Void an authorization transaction + description: | + This API voids the specific authorization transaction in order to release the blocked funds from the customer's card. Voiding an already captured or voided transaction is not possible. + operationId: void_an_authorization_transaction + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-f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1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: transaction-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - transaction + type: object + properties: + transaction: + $ref: '#/components/schemas/Transaction' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /transactions/create_authorization: + post: + summary: Create an authorization payment + description: | + Authorizes a specific amount in customer's Credit card, which can be collected within a span of time. Read more on authorization and capture [here](https://www.chargebee.com/docs/stripe.html#auth-and-capture). + operationId: create_an_authorization_payment + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?: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[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - amount + - customer_id + type: object + properties: + customer_id: + maxLength: 50 + type: string + description: | + Identifier of the customer. + deprecated: false + payment_source_id: + maxLength: 40 + type: string + description: | + Payment source to be used for authorizing the transaction. + deprecated: false + currency_code: + maxLength: 3 + type: string + description: | + The currency code (ISO 4217 format) of the transaction amount. + deprecated: false + amount: + minimum: 1 + type: integer + description: | + The amount to be blocked. + format: int64 + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - transaction + type: object + properties: + transaction: + $ref: '#/components/schemas/Transaction' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /transactions/{transaction-id}: + get: + summary: Retrieve a transaction + description: | + Retrieve a transaction identified by its unique id. + operationId: retrieve_a_transaction + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-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9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: transaction-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - transaction + type: object + properties: + transaction: + $ref: '#/components/schemas/Transaction' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /invoices/{invoice-id}/payments: + get: + summary: List payments for an invoice + description: | + Retrieves the payments for an invoice with the recent ones on top. This returns all the payment attempts(manual \& automatic) made for this invoice. + operationId: list_payments_for_an_invoice + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0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})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: invoice-id + in: path + required: true + style: simple + explode: false + schema: + type: string + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - transaction + type: object + properties: + transaction: + $ref: '#/components/schemas/Transaction' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /transactions/{transaction-id}/delete_offline_transaction: + post: + summary: Delete an offline transaction + description: | + This API deletes an offline transaction. However, to delete an offline transaction all payment allocations associated with the transaction must be removed. + operationId: delete_an_offline_transaction + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])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2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: transaction-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + comment: + maxLength: 300 + type: string + description: | + Reason for deleting this transaction. This comment will be added to the associated entity. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - transaction + type: object + properties: + transaction: + $ref: '#/components/schemas/Transaction' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /transactions/{transaction-id}/refund: + post: + summary: Refund a payment + description: | + Refunds an online payment. Applicable only for `transaction`s of [type](transactions#transaction_type) = `payment`. You can only refund a `transaction` whose [status](transactions#transaction_status)` ` is `success`. + operationId: refund_a_payment + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})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:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: transaction-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + amount: + minimum: 1 + type: integer + description: | + The amount to be refunded. Must not exceed [amount_unused](transactions#transaction_amount_unused). If not passed then all of [amount_unused](transactions#transaction_amount_unused) is refunded. + format: int64 + deprecated: false + comment: + maxLength: 300 + type: string + description: | + Remarks, if any, on the refund. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - transaction + type: object + properties: + transaction: + $ref: '#/components/schemas/Transaction' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /hosted_pages/checkout_one_time_for_items: + post: + summary: Checkout charge-items and one-time charges + description: | + Create a Chargebee hosted page to accept payment details from a customer and checkout [charge-items](./items?prod_cat_ver=2) and [one-time charges](./invoices?prod_cat_ver=2#create_invoice_for_items_and_one-time_charges). + + The following steps describe how best to use this API: + + 1. Call this endpoint, providing [item prices](./item_prices?prod_cat_ver=2), [charges](./items?prod_cat_ver=2), [coupons](./coupons?prod_cat_ver=2) and a host of other details such as billing and shipping addresses of the customer, to be prefilled on the checkout page. + 2. Send the customer to the Checkout `url` received in the response. + 3. Once they complete checkout, the set of charge-items and one-time charges are automatically invoiced against the respective `customer` record in Chargebee, and they are redirected to the `redirect_url` with the `id` and `state` attributes passed as query string parameters. + 4. [Retrieve the hosted page](./hosted_pages?prod_cat_ver=2#retrieve_a_hosted_page) at this stage to get the invoice details. + + #### Customer resource lookup and creation {#customer_lookup1} + + When [customer[id]](/docs/api/hosted_pages#checkout_charge_items_and_one_time_charges_customer_id) is provided for this operation, it is looked up by Chargebee, and if found, the hosted_page is created for it. If not found, a new customer resource is created with the ID provided, and the hosted_page is created. + + ##### Multiple business entities + + If multiple [business entities](/docs/api/advanced-features#mbe) are created for the site, the customer resource lookup and creation happen within the [context](/docs/api/advanced-features#mbe-context) of the business entity [specified](/docs/api/advanced-features#mbe-header-main) in this API call. If no business entity is specified, the customer resource lookup is performed within the [site context](/docs/api/advanced-features#mbe-context) , and if not found, the resource is created for the [default business entity](/docs/api/advanced-features#mbe-default-be) of the site. + operationId: checkout_charge-items_and_one-time_charges + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?: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-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + business_entity_id: + maxLength: 50 + type: string + description: "Sets the [context]() for this operation to the [business\ + \ entity](/docs/api/advanced-features?prod_cat_ver=2#mbe) specified.\ + \ Applicable only when multiple business entities have been created\ + \ for the site. When this parameter is provided, the operation\ + \ is able to read/write data associated only to the business entity\ + \ specified. When not provided, the operation can read/write data\ + \ for the entire site. \n**Note**\n\nAn alternative way of passing\ + \ this parameter is by means of a [custom HTTP header](/docs/api/advanced-features?prod_cat_ver=2#mbe-header-main).\ + \ \n**See also**\n\n[Customer resource lookup and creation.](/docs/api/hosted_pages#customer_lookup1)\n" + deprecated: false + layout: + type: string + description: | + Specifies the checkout layout that overrides the default checkout layout configured in the Checkout \& Self-Serve Portal settings. . \* in_app - Indicates in-app checkout version \* full_page - Indicates full page checkout version + deprecated: false + enum: + - in_app + - full_page + invoice_note: + maxLength: 2000 + type: string + description: | + A note for this particular invoice. This, and [all other notes](/docs/api/invoices#invoice_notes) for the invoice are displayed on the PDF invoice sent to the customer. + deprecated: false + coupon_ids: + type: array + description: | + List of Coupons to be added. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + currency_code: + maxLength: 3 + type: string + description: | + The currency code (ISO 4217 format) of the invoice amount. + deprecated: false + redirect_url: + maxLength: 250 + type: string + description: "The customers will be redirected to this URL upon\ + \ successful checkout. The hosted page id and state will be passed\ + \ as parameters to this URL. \n\n**Note** :\n\n* Although the\ + \ customer will be redirected to the `redirect_url` after successful\ + \ checkout, we do not recommend relying on it for completing critical\ + \ post-checkout actions. This is because redirection may not happen\ + \ due to unforeseen reasons such as user closing the tab, or exiting\ + \ the browser, and so on. If there is any synchronization that\ + \ you are doing after the redirection, you will have to have a\ + \ backup. Chargebee recommends listening to appropriate webhooks\ + \ such as [`subscription_created`](https://apidocs.chargebee.com/docs/api/events#subscription_created)\ + \ or [`invoice_generated`](https://apidocs.chargebee.com/docs/api/events#invoice_generated)to\ + \ verify a successful checkout.\n* Redirect URL configured in\ + \ Settings \\> Hosted Pages Settings would be overriden by this\ + \ redirect URL.\n* *Eg :* *http://yoursite.com?id=* *\\\\&state=succeeded*\n* This parameter is not applicable for iframe\ + \ messaging.\n" + deprecated: false + cancel_url: + maxLength: 250 + type: string + description: "The customers will be redirected to this URL upon\ + \ canceling checkout. The hosted page id and state will be passed\ + \ as parameters to this URL. \n\n**Note** :\n\n* Cancel URL\ + \ configured in Settings \\> Hosted Pages Settings would be overriden\ + \ by this cancel URL. \n *Eg : http://yoursite.com?id=\\\\&state=cancelled*\n* This parameter is not applicable for iframe\ + \ messaging and [in-app](https://www.chargebee.com/docs/2.0/checkout.html)\ + \ checkout.\n" + deprecated: false + pass_thru_content: + maxLength: 2048 + type: string + description: | + You can pass through any content specific to the hosted page request and get it back after user had submitted the hosted page. + deprecated: false + customer: + type: object + properties: + id: + maxLength: 50 + type: string + description: "The unique ID of the customer for which this `hosted_page`\ + \ should be created. If not provided, the ID of the newly\ + \ created customer resource is autogenerated. \n**See also**\n\ + \n[Customer resource lookup and creation.](/docs/api/hosted_pages#customer_lookup1)\n" + deprecated: false + email: + maxLength: 70 + type: string + description: | + Email of the customer. Configured email notifications will be sent to this email. + format: email + deprecated: false + first_name: + maxLength: 150 + type: string + description: | + First name of the customer. If not provided it will be got from contact information entered in the hosted page + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + Last name of the customer. If not provided it will be got from contact information entered in the hosted page + deprecated: false + company: + maxLength: 250 + type: string + description: | + Company name of the customer. + deprecated: false + taxability: + type: string + description: | + Specifies if the customer is liable for tax \* exempt - + + * Customer is exempted from tax. When using Chargebee's native [Taxes](https://www.chargebee.com/docs/tax.html) feature or when using the [TaxJar integration](https://www.chargebee.com/docs/taxjar.html), no other action is needed. + * However, when using our [Avalara integration](https://www.chargebee.com/docs/avalara.html), optionally, specify `entity_code` or `exempt_number` attributes if you use Chargebee's [AvaTax for Sales](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) or specify `exemption_details` attribute if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. Tax may still be applied by Avalara for certain values of `entity_code`/`exempt_number`/`exemption_details` based on the state/region/province of the taxable address. + + \* taxable - Computes tax for the customer based on the [site configuration](https://www.chargebee.com/docs/tax.html). In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero. + deprecated: false + default: taxable + enum: + - taxable + - exempt + locale: + maxLength: 50 + type: string + description: | + Determines which region-specific language Chargebee uses to communicate with the customer. In the absence of the locale attribute, Chargebee will use your site's default language for customer communication. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + Phone number of the customer + deprecated: false + vat_number: + maxLength: 20 + type: string + description: | + The VAT/tax registration number for the customer. For customers with [billing_address](customers#customer_billing_address) `country` as `XI` (which is **United Kingdom - Northern Ireland** ), the first two characters of the [full VAT + number](https://en.wikipedia.org/wiki/VAT_identification_number) can be overridden by setting [vat_number_prefix](customers#customer_vat_number_prefix). + deprecated: false + vat_number_prefix: + maxLength: 10 + type: string + description: "An overridden value for the first two characters\ + \ of the [full VAT\nnumber](https://en.wikipedia.org/wiki/VAT_identification_number).\ + \ Only applicable specifically for customers with [billing_address](customers#customer_billing_address)\ + \ `country` as `XI` (which is **United Kingdom - Northern\ + \ Ireland** ). \n\nWhen you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or have [manually\nenabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, you have the option of setting\ + \ [billing_address](customers#customer_billing_address) `country`\ + \ as `XI`. That's the code for **United Kingdom - Northern\n\ + Ireland** . The first two characters of the VAT number in\ + \ such a case is `XI` by default. However, if the VAT number\ + \ was registered in UK, the value should be `GB`. Set `vat_number_prefix`\ + \ to `GB` for such cases.\n" + deprecated: false + einvoicing_method: + type: string + description: | + null + deprecated: false + enum: + - automatic + - manual + - site_default + is_einvoice_enabled: + type: boolean + description: "Determines whether the customer is e-invoiced.\ + \ When set to `true` or not set to any value, the customer\ + \ is e-invoiced so long as e-invoicing is enabled for their\ + \ country (`billing_address.country`). When set to `false`,\ + \ the customer is not e-invoiced even if e-invoicing is enabled\ + \ for their country. \n**Tip:**\n\n\nIt is possible to set\ + \ a value for this flag even when E-Invoicing is disabled.\ + \ However, it comes into effect only when E-Invoicing is enabled.\n" + deprecated: false + entity_identifier_scheme: + maxLength: 50 + type: string + description: "The Peppol BIS scheme associated with the [vat_number](customers#customer_vat_number)\ + \ of the customer. This helps identify the specific type of\ + \ customer entity. For example, `DE:VAT` is used for a German\ + \ business entity while `DE:LWID45` is used for a German government\ + \ entity. The value must be from the list of possible values\ + \ and must correspond to the country provided under `billing_address.country`.\ + \ See [list of possible values](https://www.chargebee.com/docs/e-invoicing.html#supported-countries).\ + \ \n**Tip:**\n\n\nIf there are additional entity identifiers\ + \ for the customer not associated with the `vat_number`, they\ + \ can be provided as the `entity_identifiers[]` array.\n" + deprecated: false + entity_identifier_standard: + maxLength: 50 + type: string + description: "The standard used for specifying the `entity_identifier_scheme`.\ + \ Currently only `iso6523-actorid-upis` is supported and is\ + \ used by default when not provided. \n**Tip:**\n\n\nIf there\ + \ are additional entity identifiers for the customer not associated\ + \ with the `vat_number`, they can be provided as the `entity_identifiers[]`\ + \ array.\n" + deprecated: false + default: iso6523-actorid-upis + consolidated_invoicing: + type: boolean + description: "Indicates whether invoices raised on the same\ + \ day for the `customer` are consolidated. When provided,\ + \ this overrides the default configuration at the [site-level](https://www.chargebee.com/docs/consolidated-invoicing.html#configuring-consolidated-invoicing).\ + \ This parameter can be provided only when [Consolidated Invoicing](https://www.chargebee.com/docs/consolidated-invoicing.html)\ + \ is enabled. \n**Note:**\n\nAny invoices raised when a subscription\ + \ activates from `in_trial` or `future` `status`, are not\ + \ consolidated by default. [Contact Support](https://support.chargebee.com/support/home)\ + \ to enable consolidation for such invoices.\n" + deprecated: false + additionalProperties: true + description: | + Parameters for customer + deprecated: false + invoice: + type: object + properties: + po_number: + maxLength: 100 + type: string + description: | + Purchase Order Number for this invoice. + deprecated: false + description: | + Parameters for invoice + deprecated: false + card: + type: object + properties: + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account in which this payment source is stored. + deprecated: false + description: | + Parameters for card + deprecated: false + billing_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the billing contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the billing contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for billing_address + deprecated: false + shipping_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for shipping_address + deprecated: false + item_prices: + type: object + properties: + item_price_id: + type: array + description: | + A unique ID for your system to identify the item price. + items: + maxLength: 100 + type: string + deprecated: false + quantity: + type: array + description: | + Item price quantity + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + unit_price: + type: array + description: | + The price or per-unit-price of the item price. By default, it is the [value set](/docs/api/item_prices#item_price_price) for the `item_price`. This is only applicable when the `pricing_model` of the `item_price` is `flat_fee` or `per_unit`. The value depends on the [type of currency](/docs/api/currencies#handling_currency_units). + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + unit_price_in_decimal: + type: array + description: | + The decimal representation of the price or per-unit price of the plan. The value is in major units of the currency. Always returned when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + date_from: + type: array + description: | + The time when the service period for the item starts. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + date_to: + type: array + description: | + The time when the service period for the item ends. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + description: | + Parameters for item_prices + deprecated: false + item_tiers: + type: object + properties: + item_price_id: + type: array + description: | + The id of the item price to which this tier belongs. + items: + maxLength: 100 + type: string + deprecated: false + starting_unit: + type: array + description: | + The lowest value in the quantity tier. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + ending_unit: + type: array + description: | + The highest value in the quantity tier. + items: + type: integer + format: int32 + deprecated: false + price: + type: array + description: | + The per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. The total cost for the item price when the `pricing_model` is `stairstep`. The value is in the minor unit of the currency. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + default: 0 + starting_unit_in_decimal: + type: array + description: | + The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal` of the next lower tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + ending_unit_in_decimal: + type: array + description: | + The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal` of the next higher tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + price_in_decimal: + type: array + description: | + The decimal representation of the per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. When the `pricing_model` is `stairstep`, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: | + Parameters for item_tiers + deprecated: false + charges: + type: object + properties: + amount: + type: array + description: | + The amount to be charged. The unit depends on the [type of currency](/docs/api?prod_cat_ver=1#md_disabled). + items: + minimum: 1 + type: integer + format: int64 + deprecated: false + amount_in_decimal: + type: array + description: | + The decimal representation of the amount for the [one-time charge](https://www.chargebee.com/docs/charges.html#one-time-charges ). Provide the value in major units of the currency. Can be provided only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units ) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: + type: array + description: | + Description for this charge + items: + maxLength: 250 + type: string + deprecated: false + taxable: + type: array + description: | + The amount to be charged is taxable or not. + items: + type: boolean + deprecated: false + default: true + tax_profile_id: + type: array + description: | + Tax profile of the charge. + items: + maxLength: 50 + type: string + deprecated: false + avalara_tax_code: + type: array + description: | + The Avalara tax codes to which items are mapped to should be provided here. Applicable only if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html). + items: + maxLength: 50 + type: string + deprecated: false + hsn_code: + type: array + description: | + The [HSN code](https://cbic-gst.gov.in/gst-goods-services-rates.html) to which the item is mapped for calculating the customer's tax in India. Applicable only when both of the following conditions are true: + + * **[India](https://www.chargebee.com/docs/indian-gst.html#configuring-indian-gst)** has been enabled as a **Tax Region**. (An error is returned when this condition is not true.) + * The [**AvaTax for Sales** integration](https://www.chargebee.com/docs/avalara.html) has been enabled in Chargebee. + items: + maxLength: 50 + type: string + deprecated: false + taxjar_product_code: + type: array + description: | + The TaxJar product codes to which items are mapped to should be provided here. Applicable only if you use Chargebee's [TaxJar integration](https://www.chargebee.com/docs/taxjar.html). + items: + maxLength: 50 + type: string + deprecated: false + avalara_sale_type: + type: array + items: + type: string + description: | + Indicates the type of sale carried out. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. \* vendor_use - Transaction is for an item that is subject to vendor use tax \* consumed - Transaction is for an item that is consumed directly \* wholesale - Transaction is a sale to another company that will resell your product or service to another consumer \* retail - Transaction is a sale to an end user + deprecated: false + enum: + - wholesale + - retail + - consumed + - vendor_use + avalara_transaction_type: + type: array + description: | + Indicates the type of product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. + items: + type: integer + format: int32 + deprecated: false + avalara_service_type: + type: array + description: | + Indicates the type of service for the product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. + items: + type: integer + format: int32 + deprecated: false + date_from: + type: array + description: | + The time when the service period for the charge starts. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + date_to: + type: array + description: | + The time when the service period for the charge ends. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + description: | + Parameters for charges + deprecated: false + discounts: + required: + - apply_on + type: object + properties: + percentage: + type: array + description: | + The percentage of the original amount that should be deducted from it. Only applicable when `discount.type` is percentage. + items: + maximum: 100 + minimum: 0.01 + type: number + format: double + deprecated: false + amount: + type: array + description: | + The value of the discount. [The format of this value](https://apidocs.chargebee.com/docs/api?prod_cat_ver=2#currencies) depends on the kind of currency. This is only applicable when `discount.type` is `fixed_amount`. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + apply_on: + type: array + items: + type: string + description: | + The amount on the invoice to which the discount is applied. \* invoice_amount - The discount is applied to the invoice `sub_total`. \* specific_item_price - The discount is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id`. + deprecated: false + enum: + - invoice_amount + - specific_item_price + item_price_id: + type: array + description: | + The [id of the item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) in the subscription to which the discount is to be applied. Relevant only when `apply_on` = `specific_item_price`. + items: + maxLength: 100 + type: string + deprecated: false + description: | + Parameters for discounts + deprecated: false + entity_identifiers: + type: object + properties: + id: + type: array + description: | + The unique id for the `entity_identifier[i]` in Chargebee. This is required when `entity_identifier[operation][i]` is `update` or `delete`. + items: + maxLength: 40 + type: string + deprecated: false + scheme: + type: array + description: "The Peppol BIS scheme associated with the [vat_number](customers#customer_vat_number)\ + \ of the customer. This helps identify the specific type of\ + \ customer entity. For example, `DE:VAT` is used for a German\ + \ business entity while `DE:LWID45` is used for a German government\ + \ entity. The value must be from the list of possible values\ + \ and must correspond to the country provided under `billing_address.country`.\ + \ See [list of possible values](https://www.chargebee.com/docs/e-invoicing.html#supported-countries).\ + \ \n**Tip:**\n\n\nIf there is only one entity identifier\ + \ for the customer and the value is the same as `vat_number`,\ + \ then there is no need to provide the `entity_identifiers[]`\ + \ array. See [description for `entity_identifiers[]`](customers#customer_entity_identifiers).\n" + items: + maxLength: 50 + type: string + deprecated: false + value: + type: array + description: "The value of the `entity_identifier`. This identifies\ + \ the customer entity on the Peppol network. For example:\ + \ `10101010-STO-10`. \n**Tip:**\n\n\nIf there is only one\ + \ entity identifier for the customer and the value is the\ + \ same as `vat_number`, then there is no need to provide the\ + \ `entity_identifiers[]` array. See [description for `entity_identifiers[]`](customers#customer_entity_identifiers).\n" + items: + maxLength: 50 + type: string + deprecated: false + operation: + type: array + items: + type: string + description: | + The operation to be performed for the `entity_identifier`. \* create - Creates a new `entity_identifier` for the customer. \* update - Updates an existing `entity_identifier` for the customer. `entity_identifier[id]` must be provided in this case. \* delete - Deletes an existing `entity_identifier` for the customer. `entity_identifier[id]` must be provided in this case. + deprecated: false + enum: + - create + - update + - delete + standard: + type: array + description: "The standard used for specifying the `entity_identifier`\ + \ `scheme`. Currently, only `iso6523-actorid-upis` is supported\ + \ and is used by default when not provided. \n**Tip:**\n\n\ + \nIf there is only one entity identifier for the customer\ + \ and the value is the same as `vat_number`, then there is\ + \ no need to provide the `entity_identifiers[]` array. See\ + \ [description for `entity_identifiers[]`](customers#customer_entity_identifiers).\n" + items: + maxLength: 50 + type: string + deprecated: false + default: iso6523-actorid-upis + description: | + Parameters for entity_identifiers + deprecated: false + encoding: + billing_address: + style: deepObject + explode: true + card: + style: deepObject + explode: true + charges: + style: deepObject + explode: true + customer: + style: deepObject + explode: true + discounts: + style: deepObject + explode: true + entity_identifiers: + style: deepObject + explode: true + invoice: + style: deepObject + explode: true + item_prices: + style: deepObject + explode: true + item_tiers: + style: deepObject + explode: true + shipping_address: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - hosted_page + type: object + properties: + hosted_page: + $ref: '#/components/schemas/HostedPage' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /hosted_pages/update_payment_method: + post: + summary: Update payment method + description: | + **Note:** If you're using [In-App Checkout](https://www.chargebee.com/docs/2.0/checkout.html), use [Manage Payment Sources API](/docs/api/hosted_pages#manage_payment_sources) to request your customers to update their payment method details or change their payment method. + + Using this API, you can request your customers to update their payment method details or change their payment method. This is used in scenarios like customers updating their payment methods before the end of trial or customers switching among payment methods. + + When this API is invoked, it returns a hosted page URL. When the customers are directed to this URL, they will be able to change/update their payment methods. + + Depending on the payment methods (Card, PayPal Express Checkout, Amazon Payments) that you offer your customers, they will find options to switch among the various methods of payment. + **Note:** + + * If the card\[gateway\] parameter is passed, and the customer chooses Card as a payment method, then the card details are stored in the gateway which is passed. However, if the card\[gateway\] parameter is passed and the customer chooses PayPal Express Checkout/Amazon Payments as a payment method, the gateway passed will be ignored. + * The option of embedding into an iframe is not supported for PayPal Express Checkout and Amazon Payments as customers are redirected to the respective website pages. Hence if you have PayPal Express Checkout/Amazon Payments configured and pass the parameter embed=true, this will result in an unsuccessful API request. Also, if you have all the three payment methods (Card, Paypal Express Checkout and Amazon Payments) configured and pass the parameter embed=true, the returned hosted page URL will show only Card Payment as a payment method. + operationId: update_payment_method + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?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-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + redirect_url: + maxLength: 250 + type: string + description: "The customers will be redirected to this URL upon\ + \ successful checkout. The hosted page id and state will be passed\ + \ as parameters to this URL. \n\n**Note** :\n\n* Although the\ + \ customer will be redirected to the `redirect_url` after successful\ + \ checkout, we do not recommend relying on it for completing critical\ + \ post-checkout actions. This is because redirection may not happen\ + \ due to unforeseen reasons such as user closing the tab, or exiting\ + \ the browser, and so on. If there is any synchronization that\ + \ you are doing after the redirection, you will have to have a\ + \ backup. Chargebee recommends listening to appropriate webhooks\ + \ such as [`subscription_created`](https://apidocs.chargebee.com/docs/api/events#subscription_created)\ + \ or [`invoice_generated`](https://apidocs.chargebee.com/docs/api/events#invoice_generated)to\ + \ verify a successful checkout.\n* Redirect URL configured in\ + \ Settings \\> Hosted Pages Settings would be overriden by this\ + \ redirect URL.\n* *Eg :* *http://yoursite.com?id=* *\\\\&state=succeeded*\n* This parameter is not applicable for iframe\ + \ messaging.\n" + deprecated: false + cancel_url: + maxLength: 250 + type: string + description: "The customers will be redirected to this URL upon\ + \ canceling checkout. The hosted page id and state will be passed\ + \ as parameters to this URL. \n\n**Note** :\n\n* Cancel URL\ + \ configured in Settings \\> Hosted Pages Settings would be overriden\ + \ by this cancel URL. \n *Eg : http://yoursite.com?id=\\\\&state=cancelled*\n* This parameter is not applicable for iframe\ + \ messaging and [in-app](https://www.chargebee.com/docs/2.0/checkout.html)\ + \ checkout.\n" + deprecated: false + pass_thru_content: + maxLength: 2048 + type: string + description: | + You can pass through any content specific to the hosted page request and get it back after user had submitted the hosted page. + deprecated: false + iframe_messaging: + type: boolean + description: "If true then iframe will communicate with the parent\ + \ window. Applicable only for embedded(iframe) hosted pages. If\ + \ you're using iframe_messaging you need to implement onSuccess\ + \ \\& onCancel callbacks. \n\n**Note** : This parameter is not\ + \ applicable for [in-app](https://www.chargebee.com/docs/checkout-v3.html)\ + \ checkout.\n" + deprecated: false + default: false + customer: + required: + - id + type: object + properties: + id: + maxLength: 50 + type: string + description: | + Identifier of the customer. + deprecated: false + description: | + Parameters for customer + deprecated: false + card: + type: object + properties: + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account in which this payment source is stored. + deprecated: false + description: | + Parameters for card + deprecated: false + encoding: + card: + style: deepObject + explode: true + customer: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - hosted_page + type: object + properties: + hosted_page: + $ref: '#/components/schemas/HostedPage' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /hosted_pages/extend_subscription: + post: + summary: Extend Subscription + description: | + This API generates a hosted page URL to extend the billing cycle of a subscription. + operationId: extend_subscription + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a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1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + expiry: + maximum: 500 + minimum: 1 + type: integer + description: | + Expiry (in days) for the link generated. No expiry will be set if this is not specified. + format: int32 + deprecated: false + billing_cycle: + minimum: 1 + type: integer + description: | + Number of billing cycles to extend. If not specified, plan's billing cycle will be used. + format: int32 + deprecated: false + subscription: + required: + - id + type: object + properties: + id: + maxLength: 50 + type: string + description: | + A unique and immutable identifier for the subscription. If not provided, it is autogenerated. + deprecated: false + description: | + Parameters for subscription + deprecated: false + encoding: + subscription: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - hosted_page + type: object + properties: + hosted_page: + $ref: '#/components/schemas/HostedPage' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /hosted_pages/events: + post: + summary: Notify an event + description: | + Use this API to notify Chargebee about important events that occur on your web pages, such as subscription cancellations. An event contains data about affected resources and additional details such as when the change occurred. + operationId: notify_an_event + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]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0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - event_data + - event_name + type: object + properties: + event_name: + type: string + description: | + The event that need to passed to a different system. \* cancellation_page_loaded - Indicates native cancellation flow provided by the merchant is loaded rather than the retention flow. + deprecated: false + enum: + - cancellation_page_loaded + occurred_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + Timestamp indicating when this event had occurred. . + format: unix-time + deprecated: false + event_data: + type: object + additionalProperties: true + description: | + The meta data description of the event in key-value pair. The value is a JSON object with the following keys and their values. \* \`subscription_id\`: A unique and immutable identifier for the subscription. . + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - success + type: object + properties: + success: + type: boolean + deprecated: false + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /hosted_pages/checkout_gift_for_items: + post: + summary: Checkout Gift subscription for Items + description: | + Creates a hosted page for a customer (called the gifter) to gift a subscription to another customer (called the receiver). + + #### Gifter customer resource lookup and creation {#gifter_lookup} + + When [gifter[customer_id]](/docs/api/hosted_pages#checkout_gift_subscription_for_items_gifter_customer_id) is provided, it is looked up in Chargebee when the gifter completes the hosted page checkout. If not found, a new customer resource is created with this ID. + + ##### Multiple business entities + + If multiple [business entities](/docs/api/advanced-features?prod_cat_ver=2#mbe) are created for the site, the lookup and creation of the gifter customer resource happen within the [context](/docs/api/advanced-features#mbe-context) of the business entity specified in this API call. If no business entity is [specified](/docs/api/advanced-features#mbe-header-main), the customer resource lookup is performed within the [site context](/docs/api/advanced-features#mbe-context), and if not found, the resource is created for the [default business entity](/docs/api/advanced-features#mbe-default-be) of the site. + + #### Gift receiver customer resource lookup and creation {#receiver_lookup} + + Once the gifter checks out using the hosted page returned by this endpoint, Chargebee checks if a customer resource with the receiver's email address exists. The first such customer record is considered the receiver's customer resource. A new customer resource is created for the receiver if none are found. + + ##### Multiple business entities + + If multiple [business entities](/docs/api/advanced-features?prod_cat_ver=2#mbe) are created for the site, the lookup and creation of the gift receiver's customer resource happen within the [context](/docs/api/advanced-features#mbe-context) of the business entity of the gifter + operationId: checkout_gift_subscription_for_items + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{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]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + business_entity_id: + maxLength: 50 + type: string + description: "Sets the [context]() for this operation to the [business\ + \ entity](/docs/api/advanced-features?prod_cat_ver=2#mbe) specified.\ + \ Applicable only when multiple business entities have been created\ + \ for the site. When this parameter is provided, the operation\ + \ is able to read/write data associated only to the business entity\ + \ specified. When not provided, the operation can read/write data\ + \ for the entire site. \n**Note**\n\nAn alternative way of passing\ + \ this parameter is by means of a [custom HTTP header](/docs/api/advanced-features?prod_cat_ver=2#mbe-header-main).\ + \ \n**See also**\n\nGifter customer resource lookup and creation.\n" + deprecated: false + redirect_url: + maxLength: 250 + type: string + description: "The customers will be redirected to this URL upon\ + \ successful checkout. The hosted page id and state will be passed\ + \ as parameters to this URL. \n\n**Note** :\n\n* Although the\ + \ customer will be redirected to the `redirect_url` after successful\ + \ checkout, we do not recommend relying on it for completing critical\ + \ post-checkout actions. This is because redirection may not happen\ + \ due to unforeseen reasons such as user closing the tab, or exiting\ + \ the browser, and so on. If there is any synchronization that\ + \ you are doing after the redirection, you will have to have a\ + \ backup. Chargebee recommends listening to appropriate webhooks\ + \ such as [`subscription_created`](https://apidocs.chargebee.com/docs/api/events#subscription_created)\ + \ or [`invoice_generated`](https://apidocs.chargebee.com/docs/api/events#invoice_generated)to\ + \ verify a successful checkout.\n* Redirect URL configured in\ + \ Settings \\> Hosted Pages Settings would be overriden by this\ + \ redirect URL.\n* *Eg :* *http://yoursite.com?id=* *\\\\&state=succeeded*\n* This parameter is not applicable for iframe\ + \ messaging.\n" + deprecated: false + coupon_ids: + type: array + description: | + List of coupons to be applied to this subscription. You can provide coupon ids or [coupon codes](https://apidocs.chargebee.com/docs/api/coupon_codes). + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + gifter: + type: object + properties: + customer_id: + maxLength: 50 + type: string + description: "The customer ID of the gifter. If not provided,\ + \ the gifter customer resource is created with an autogenerated\ + \ ID on checkout. \n**See also**\n\n[Gifter customer resource\ + \ lookup and creation](/docs/api/hosted_pages#gifter_lookup)\n" + deprecated: false + locale: + maxLength: 50 + type: string + description: | + Determines which region-specific language Chargebee uses to communicate with the customer. In the absence of the locale attribute, Chargebee will use your site's default language for customer communication. + deprecated: false + description: | + Parameters for gifter + deprecated: false + subscription_items: + type: object + properties: + item_price_id: + type: array + description: | + The unique identifier of the item price. + items: + maxLength: 100 + type: string + deprecated: false + quantity: + type: array + description: | + The quantity of the item purchased + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + default: 1 + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + description: | + Parameters for subscription_items + deprecated: false + encoding: + gifter: + style: deepObject + explode: true + subscription_items: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - hosted_page + type: object + properties: + hosted_page: + $ref: '#/components/schemas/HostedPage' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /hosted_pages: + get: + summary: List hosted pages + description: | + This API retrieves the list of hosted page resources. + operationId: list_hosted_pages + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(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))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: id + in: query + description: "optional, string filter
Unique\ + \ identifier generated for each hosted page requested.
Supported operators\ + \ : is, is_not, starts_with, in, not_in

Example id[is] = \"Edi69nxpu6BeGBd9Fjcd0tqCSwb0sRcuKa\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: Edi69nxpu6BeGBd9Fjcd0tqCSwb0sRcuKa + deprecated: false + - name: type + in: query + description: "optional, enumerated string filter
Type\ + \ of the requested hosted page. Possible values are : checkout_new,\ + \ checkout_existing, update_payment_method, manage_payment_sources, collect_now,\ + \ extend_subscription, checkout_one_time, pre_cancel.
Supported\ + \ operators : is, is_not, in, not_in

Example type[is_not] = \"checkout_new\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`checkout_new\` - Checkout new Subscription \* \`checkout_existing\` - Checkout existing Subscription \* \`update_card\` - \*\*(Deprecated)\*\* Update Card for a Customer \* \`update_payment_method\` - Update Payment Method for a Customer \* \`manage_payment_sources\` - Manage Payments for a customer \* \`collect_now\` - Collect Unpaid Invoices for a Customer \* \`extend_subscription\` - To extend a Subscription period \* \`checkout_one_time\` - Checkout one time \* \`pre_cancel\` - This hosted page is used to help retain customers when they attempt to cancel their account or subscription. \* \`view_voucher\` - View Details of a voucher + enum: + - checkout_new + - checkout_existing + - update_payment_method + - manage_payment_sources + - collect_now + - extend_subscription + - checkout_one_time + - pre_cancel + - view_voucher + is_not: + type: string + description: | + \* \`checkout_new\` - Checkout new Subscription \* \`checkout_existing\` - Checkout existing Subscription \* \`update_card\` - \*\*(Deprecated)\*\* Update Card for a Customer \* \`update_payment_method\` - Update Payment Method for a Customer \* \`manage_payment_sources\` - Manage Payments for a customer \* \`collect_now\` - Collect Unpaid Invoices for a Customer \* \`extend_subscription\` - To extend a Subscription period \* \`checkout_one_time\` - Checkout one time \* \`pre_cancel\` - This hosted page is used to help retain customers when they attempt to cancel their account or subscription. \* \`view_voucher\` - View Details of a voucher + enum: + - checkout_new + - checkout_existing + - update_payment_method + - manage_payment_sources + - collect_now + - extend_subscription + - checkout_one_time + - pre_cancel + - view_voucher + in: + pattern: "^\\[(checkout_new|checkout_existing|update_card|update_payment_method|manage_payment_sources|collect_now|extend_subscription|checkout_one_time|pre_cancel|view_voucher)(,(checkout_new|checkout_existing|update_card|update_payment_method|manage_payment_sources|collect_now|extend_subscription|checkout_one_time|pre_cancel|view_voucher))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(checkout_new|checkout_existing|update_card|update_payment_method|manage_payment_sources|collect_now|extend_subscription|checkout_one_time|pre_cancel|view_voucher)(,(checkout_new|checkout_existing|update_card|update_payment_method|manage_payment_sources|collect_now|extend_subscription|checkout_one_time|pre_cancel|view_voucher))*\\\ + ]$" + type: string + example: checkout_new + deprecated: false + - name: state + in: query + description: "optional, enumerated string filter
Indicating\ + \ the current state of the hosted page resource. Possible values are : created,\ + \ requested, succeeded, cancelled, acknowledged.
Supported operators\ + \ : is, is_not, in, not_in

Example state[is] = \"succeeded\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`created\` - Indicates the hosted page is just created. \* \`requested\` - Indicates the hosted page is requested by the website \* \`succeeded\` - Indicates the hosted page is successfully submitted by the user and response is sent to the return url. \* \`cancelled\` - Indicates the page is cancelled by the end user after requesting it. \* \`failed\` - \*\*(Deprecated)\*\* Indicates the page submition is failed and response is sent to the return url. \* \`acknowledged\` - Indicates the succeeded hosted page is acknowledged. + enum: + - created + - requested + - succeeded + - cancelled + - acknowledged + is_not: + type: string + description: | + \* \`created\` - Indicates the hosted page is just created. \* \`requested\` - Indicates the hosted page is requested by the website \* \`succeeded\` - Indicates the hosted page is successfully submitted by the user and response is sent to the return url. \* \`cancelled\` - Indicates the page is cancelled by the end user after requesting it. \* \`failed\` - \*\*(Deprecated)\*\* Indicates the page submition is failed and response is sent to the return url. \* \`acknowledged\` - Indicates the succeeded hosted page is acknowledged. + enum: + - created + - requested + - succeeded + - cancelled + - acknowledged + in: + pattern: "^\\[(created|requested|succeeded|cancelled|failed|acknowledged)(,(created|requested|succeeded|cancelled|failed|acknowledged))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(created|requested|succeeded|cancelled|failed|acknowledged)(,(created|requested|succeeded|cancelled|failed|acknowledged))*\\\ + ]$" + type: string + example: succeeded + deprecated: false + - name: updated_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
Timestamp indicating when this hosted page was last updated.
Supported\ + \ operators : after, before, on, between

Example updated_at[on] = \"1490784813\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1490784813" + deprecated: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - hosted_page + type: object + properties: + hosted_page: + $ref: '#/components/schemas/HostedPage' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /hosted_pages/view_voucher: + post: + summary: Create a hosted page to view Boleto vouchers + description: | + Creates a `hosted_page` resource of type, `view_voucher`. When your end customers choose the Boleto payment method, you can generate a voucher for their pending invoice. Using this API, you can create a voucher_detail hosted page for your customers and email them a link to this hosted page. Your customers can review the voucher details on the page by clicking the link in the email. + operationId: create_a_hosted_page_to_view_boleto_vouchers + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0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3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + payment_voucher: + required: + - id + type: object + properties: + id: + maxLength: 40 + type: string + description: | + The unique [ID of the voucher](https://apidocs.chargebee.com/docs/api/payment_vouchers#payment_voucher_id) which the customer wants to view. + deprecated: false + description: | + Parameters for payment_voucher + deprecated: false + customer: + type: object + properties: + locale: + maxLength: 50 + type: string + description: | + Determines which region-specific language Chargebee uses to communicate with the customer. In the absence of the locale attribute, Chargebee will use your site's default language for customer communication. + deprecated: false + description: | + Parameters for customer + deprecated: false + encoding: + customer: + style: deepObject + explode: true + payment_voucher: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - hosted_page + type: object + properties: + hosted_page: + $ref: '#/components/schemas/HostedPage' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /hosted_pages/collect_now: + post: + summary: Collect Now + description: | + This API generates a hosted page URL to collect due payments for the customer. + operationId: collect_now + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?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:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + redirect_url: + maxLength: 250 + type: string + description: | + Used to specify the destination URL to which a user is redirected after invoices are paid. The [transaction ID](/docs/api/transactions#transaction_id) of the transactions made through the Pay Now hosted page will be sent as return variables along with the URL. + deprecated: false + currency_code: + maxLength: 3 + type: string + description: | + The currency code (ISO 4217 format) of the specified *credit amount*. + deprecated: false + customer: + required: + - id + type: object + properties: + id: + maxLength: 50 + type: string + description: | + Identifier of the customer. + deprecated: false + description: | + Parameters for customer + deprecated: false + card: + type: object + properties: + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account in which this payment source is stored. + deprecated: false + description: | + Parameters for card + deprecated: false + encoding: + card: + style: deepObject + explode: true + customer: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - hosted_page + type: object + properties: + hosted_page: + $ref: '#/components/schemas/HostedPage' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /hosted_pages/accept_quote: + post: + summary: Accept a quote + description: | + This API generates a hosted page URL for the customer to accept a quote. If the hosted page URL has expired, a new URL will be generated automatically. + operationId: accept_a_quote + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)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:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + redirect_url: + maxLength: 250 + type: string + description: "The customers will be redirected to this URL upon\ + \ successful checkout. The hosted page id and state will be passed\ + \ as parameters to this URL. \n\n**Note** :\n\n* Although the\ + \ customer will be redirected to the `redirect_url` after successful\ + \ checkout, we do not recommend relying on it for completing critical\ + \ post-checkout actions. This is because redirection may not happen\ + \ due to unforeseen reasons such as user closing the tab, or exiting\ + \ the browser, and so on. If there is any synchronization that\ + \ you are doing after the redirection, you will have to have a\ + \ backup. Chargebee recommends listening to appropriate webhooks\ + \ such as [`subscription_created`](https://apidocs.chargebee.com/docs/api/events#subscription_created)\ + \ or [`invoice_generated`](https://apidocs.chargebee.com/docs/api/events#invoice_generated)to\ + \ verify a successful checkout.\n* Redirect URL configured in\ + \ Settings \\> Hosted Pages Settings would be overriden by this\ + \ redirect URL.\n* *Eg :* *http://yoursite.com?id=* *\\\\&state=succeeded*\n* This parameter is not applicable for iframe\ + \ messaging.\n" + deprecated: false + layout: + type: string + description: | + null + deprecated: false + enum: + - in_app + - full_page + quote: + required: + - id + type: object + properties: + id: + maxLength: 50 + type: string + description: | + The quote number. Acts as a identifier for quote and typically generated sequentially. + deprecated: false + description: | + Parameters for quote + deprecated: false + encoding: + quote: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - hosted_page + type: object + properties: + hosted_page: + $ref: '#/components/schemas/HostedPage' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /hosted_pages/checkout_new_for_items: + post: + summary: Create checkout for a new subscription + description: "Create a Chargebee hosted page to accept payment details from\ + \ a customer and checkout a new subscription.\n\nThe following steps describe\ + \ how best to use this API:\n\n1. Call this endpoint, providing [item prices](./item_prices?prod_cat_ver=2),\ + \ [coupons](./coupons?prod_cat_ver=2) and a host of other details such as\ + \ billing and shipping addresses to be prefilled for the customer on the checkout\ + \ page.\n2. Send the customer to the Checkout `url` received in the response.\n\ + 3. Once they complete checkout, a new subscription is automatically created\ + \ and the customer is redirected to the `redirect_url` with the `id` and `state`\ + \ attributes passed as query string parameters. \n Although the customer\ + \ will be redirected to the `redirect_url` after successful checkout, we do\ + \ not recommend relying on it for completing critical post-checkout actions.\ + \ This is because redirection may not happen due to unforeseen reasons. Chargebee\ + \ recommends listening to appropriate webhooks such as [subscription_created](./events#subscription_created)\ + \ or [invoice_generated](./events#invoice_generated) to verify a successful\ + \ checkout.\n4. [Retrieve the hosted page](./hosted_pages?prod_cat_ver=2#retrieve_a_hosted_page)\ + \ at this stage to get the subscription and invoice details.\n\n\n\n#### Customer\ + \ resource lookup and creation {#customer_lookup2}\n\nWhen the [customer[id]](/docs/api/hosted_pages#create_checkout_for_a_new_subscription_customer_id)\ + \ parameter is provided and if a customer resource with the ID is found to\ + \ be already created in Chargebee, the subscription is created under that\ + \ customer resource. If not found, then a new customer resource is created\ + \ with the ID provided and the subscription is created under it.\n\n#####\ + \ Multiple business entities\n\nIf multiple [business entities](/docs/api/advanced-features?prod_cat_ver=2#mbe)\ + \ are created for the site, the customer resource lookup and creation happen\ + \ within the [context](/docs/api/advanced-features#mbe-context) of the business\ + \ entity [specified](/docs/api/advanced-features#mbe-header-main) in this\ + \ API call. If no business entity is specified, the customer resource lookup\ + \ is performed within the [site context](/docs/api/advanced-features#mbe-context),\ + \ and if not found, the resource is created for the [default business entity](/docs/api/advanced-features#mbe-default-be)\ + \ of the site.\n" + operationId: create_checkout_for_a_new_subscription + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})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0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + layout: + type: string + description: | + Specifies the checkout layout that overrides the default checkout layout configured in the Checkout \& Self-Serve Portal settings. . \* in_app - Indicates in-app checkout version \* full_page - Indicates full page checkout version + deprecated: false + enum: + - in_app + - full_page + business_entity_id: + maxLength: 50 + type: string + description: "Sets the [context]() for this operation to the [business\ + \ entity](/docs/api/advanced-features?prod_cat_ver=2#mbe) specified.\ + \ Applicable only when multiple business entities have been created\ + \ for the site. When this parameter is provided, the operation\ + \ is able to read/write data associated only to the business entity\ + \ specified. When not provided, the operation can read/write data\ + \ for the entire site. \n**Note**\n\nAn alternative way of passing\ + \ this parameter is by means of a [custom HTTP header](/docs/api/advanced-features?prod_cat_ver=2#mbe-header-main).\ + \ \n**See also**\n\n[Customer resource lookup and creation.](/docs/api/hosted_pages#customer_lookup2)\n" + deprecated: false + billing_cycles: + minimum: 0 + type: integer + description: | + The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles [set for the plan-item price](https://apidocs.chargebee.com/docs/api/item_prices?prod_cat_ver=2#item_price_billing_cycles) is used. + format: int32 + deprecated: false + mandatory_items_to_remove: + type: array + description: | + Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver=2) that are to be removed from the subscription. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + terms_to_charge: + minimum: 1 + type: integer + description: | + The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html). + format: int32 + deprecated: false + billing_alignment_mode: + type: string + description: | + Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date) for Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site. \* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly.. \* delayed - Subscription period will be aligned with the configured billing date at the next renewal. + deprecated: false + enum: + - immediate + - delayed + coupon_ids: + type: array + description: | + List of coupons to be applied to this subscription. You can provide coupon ids or [coupon codes](https://apidocs.chargebee.com/docs/api/coupon_codes). + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + redirect_url: + maxLength: 250 + type: string + description: "The customers will be redirected to this URL upon\ + \ successful checkout. The hosted page id and state will be passed\ + \ as parameters to this URL. \n\n**Note** :\n\n* Although the\ + \ customer will be redirected to the `redirect_url` after successful\ + \ checkout, we do not recommend relying on it for completing critical\ + \ post-checkout actions. This is because redirection may not happen\ + \ due to unforeseen reasons such as user closing the tab, or exiting\ + \ the browser, and so on. If there is any synchronization that\ + \ you are doing after the redirection, you will have to have a\ + \ backup. Chargebee recommends listening to appropriate webhooks\ + \ such as [`subscription_created`](https://apidocs.chargebee.com/docs/api/events#subscription_created)\ + \ or [`invoice_generated`](https://apidocs.chargebee.com/docs/api/events#invoice_generated)to\ + \ verify a successful checkout.\n* Redirect URL configured in\ + \ Settings \\> Hosted Pages Settings would be overriden by this\ + \ redirect URL.\n* *Eg :* *http://yoursite.com?id=* *\\\\&state=succeeded*\n* This parameter is not applicable for iframe\ + \ messaging.\n" + deprecated: false + cancel_url: + maxLength: 250 + type: string + description: "The customers will be redirected to this URL upon\ + \ canceling checkout. The hosted page id and state will be passed\ + \ as parameters to this URL. \n\n**Note** :\n\n* Cancel URL\ + \ configured in Settings \\> Hosted Pages Settings would be overriden\ + \ by this cancel URL. \n *Eg : http://yoursite.com?id=\\\\&state=cancelled*\n* This parameter is not applicable for iframe\ + \ messaging and [in-app](https://www.chargebee.com/docs/2.0/checkout.html)\ + \ checkout.\n" + deprecated: false + pass_thru_content: + maxLength: 2048 + type: string + description: | + You can pass through any content specific to the hosted page request and get it back after user had submitted the hosted page. + deprecated: false + allow_offline_payment_methods: + type: boolean + description: | + Allow the customer to select an offline payment method during checkout. The choice of payment methods can be configured via the Chargebee UI. + deprecated: false + subscription: + type: object + properties: + id: + maxLength: 50 + type: string + description: | + A unique and immutable identifier for a new subscription. If not provided, it is autogenerated. + deprecated: false + trial_end: + pattern: "^[0-9]{10}$" + type: integer + description: | + End of the trial period for the subscription. This overrides the trial period set for the plan-item. The value must be later than `start_date`. Set it to `0` to have no trial period. This parameter overrides the [`item_price_trial_period`](/docs/api/item_prices#item_price_trial_period) directly. + format: unix-time + deprecated: false + start_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The date/time at which the subscription is to start. If not provided, the subscription starts immediately. You can provide a value in the past as well. This is called backdating the subscription creation and is done when the subscription has already been provisioned but its billing has been delayed. Backdating is allowed only when the following prerequisites are met: + + * Backdating is enabled for subscription creation operations. + * The current day of the month does not exceed the limit set in Chargebee for backdating such operations. This day is typically the day of the month by which the accounting for the previous month must be closed. + * The date is not more than duration X into the past, where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `start_date` cannot be earlier than 14th February. + format: unix-time + deprecated: false + coupon: + maxLength: 100 + type: string + description: | + The id of the coupon. For validating the coupon code provided by the user , use the following codes in combination with the param attribute in the error response. + + * **resource_not_found :** Returned if the coupon is not present. + * **resource_limit_exhausted :** Returned if the coupon has expired or the maximum redemption for the coupon has already been reached. + * **invalid_request :** Returned if the coupon is not applicable for the particular plan/addon. + deprecated: false + auto_collection: + type: string + description: | + Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property. \* off - Automatic collection of charges will not be made for this subscription. Use this for offline payments. \* on - Whenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available. + deprecated: false + enum: + - "on" + - "off" + invoice_notes: + maxLength: 2000 + type: string + description: | + A customer-facing note added to all invoices associated with this subscription. This note is one among [all the notes](/docs/api/invoices#invoice_notes) displayed on the invoice PDF. + deprecated: false + contract_term_billing_cycle_on_renewal: + maximum: 100 + minimum: 1 + type: integer + description: | + Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles` or a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms). + format: int32 + deprecated: false + additionalProperties: true + description: | + Parameters for subscription + deprecated: false + customer: + type: object + properties: + id: + maxLength: 50 + type: string + description: "The unique identifier for the customer resource\ + \ for which the subscription should be created. \n**See also**\n\ + \n[Customer resource lookup and creation.](/docs/api/hosted_pages#customer_lookup2)\n\ + \nWhen not provided, a new customer is created with the ID\ + \ set to the value provided for `subscription[id]`. If `subscription[id]`\ + \ is unavailable, then the customer ID is autogenerated.\n" + deprecated: false + email: + maxLength: 70 + type: string + description: | + Email of the customer. Configured email notifications will be sent to this email. + format: email + deprecated: false + first_name: + maxLength: 150 + type: string + description: | + First name of the customer. If not provided it will be got from contact information entered in the hosted page + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + Last name of the customer. If not provided it will be got from contact information entered in the hosted page + deprecated: false + company: + maxLength: 250 + type: string + description: | + Company name of the customer. + deprecated: false + taxability: + type: string + description: | + Specifies if the customer is liable for tax \* exempt - + + * Customer is exempted from tax. When using Chargebee's native [Taxes](https://www.chargebee.com/docs/tax.html) feature or when using the [TaxJar integration](https://www.chargebee.com/docs/taxjar.html), no other action is needed. + * However, when using our [Avalara integration](https://www.chargebee.com/docs/avalara.html), optionally, specify `entity_code` or `exempt_number` attributes if you use Chargebee's [AvaTax for Sales](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) or specify `exemption_details` attribute if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. Tax may still be applied by Avalara for certain values of `entity_code`/`exempt_number`/`exemption_details` based on the state/region/province of the taxable address. + + \* taxable - Computes tax for the customer based on the [site configuration](https://www.chargebee.com/docs/tax.html). In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero. + deprecated: false + default: taxable + enum: + - taxable + - exempt + locale: + maxLength: 50 + type: string + description: | + Determines which region-specific language Chargebee uses to communicate with the customer. In the absence of the locale attribute, Chargebee will use your site's default language for customer communication. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + Phone number of the customer + deprecated: false + vat_number: + maxLength: 20 + type: string + description: | + The VAT/tax registration number for the customer. For customers with [billing_address](customers#customer_billing_address) `country` as `XI` (which is **United Kingdom - Northern Ireland** ), the first two characters of the [full VAT + number](https://en.wikipedia.org/wiki/VAT_identification_number) can be overridden by setting [vat_number_prefix](customers#customer_vat_number_prefix). + deprecated: false + vat_number_prefix: + maxLength: 10 + type: string + description: "An overridden value for the first two characters\ + \ of the [full VAT\nnumber](https://en.wikipedia.org/wiki/VAT_identification_number).\ + \ Only applicable specifically for customers with [billing_address](customers#customer_billing_address)\ + \ `country` as `XI` (which is **United Kingdom - Northern\ + \ Ireland** ). \n\nWhen you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or have [manually\nenabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, you have the option of setting\ + \ [billing_address](customers#customer_billing_address) `country`\ + \ as `XI`. That's the code for **United Kingdom - Northern\n\ + Ireland** . The first two characters of the VAT number in\ + \ such a case is `XI` by default. However, if the VAT number\ + \ was registered in UK, the value should be `GB`. Set `vat_number_prefix`\ + \ to `GB` for such cases.\n" + deprecated: false + is_einvoice_enabled: + type: boolean + description: "Determines whether the customer is e-invoiced.\ + \ When set to `true` or not set to any value, the customer\ + \ is e-invoiced so long as e-invoicing is enabled for their\ + \ country (`billing_address.country`). When set to `false`,\ + \ the customer is not e-invoiced even if e-invoicing is enabled\ + \ for their country. \n**Tip:**\n\n\nIt is possible to set\ + \ a value for this flag even when E-Invoicing is disabled.\ + \ However, it comes into effect only when E-Invoicing is enabled.\n" + deprecated: false + entity_identifier_scheme: + maxLength: 50 + type: string + description: "The Peppol BIS scheme associated with the [vat_number](customers#customer_vat_number)\ + \ of the customer. This helps identify the specific type of\ + \ customer entity. For example, `DE:VAT` is used for a German\ + \ business entity while `DE:LWID45` is used for a German government\ + \ entity. The value must be from the list of possible values\ + \ and must correspond to the country provided under `billing_address.country`.\ + \ See [list of possible values](https://www.chargebee.com/docs/e-invoicing.html#supported-countries).\ + \ \n**Tip:**\n\n\nIf there are additional entity identifiers\ + \ for the customer not associated with the `vat_number`, they\ + \ can be provided as the `entity_identifiers[]` array.\n" + deprecated: false + entity_identifier_standard: + maxLength: 50 + type: string + description: "The standard used for specifying the `entity_identifier_scheme`.\ + \ Currently only `iso6523-actorid-upis` is supported and is\ + \ used by default when not provided. \n**Tip:**\n\n\nIf there\ + \ are additional entity identifiers for the customer not associated\ + \ with the `vat_number`, they can be provided as the `entity_identifiers[]`\ + \ array.\n" + deprecated: false + default: iso6523-actorid-upis + einvoicing_method: + type: string + description: | + null + deprecated: false + enum: + - automatic + - manual + - site_default + additionalProperties: true + description: | + Parameters for customer + deprecated: false + card: + type: object + properties: + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account in which this payment source is stored. + deprecated: false + description: | + Parameters for card + deprecated: false + billing_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the billing contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the billing contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for billing_address + deprecated: false + shipping_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for shipping_address + deprecated: false + contract_term: + type: object + properties: + action_at_term_end: + type: string + description: |+ + Action to be taken when the contract term completes. \* evergreen - Contract term completes and the subscription renews. \* renew - + * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](subscriptions#create_subscription_for_customer_contract_term_billing_cycle_on_renewal). + * The `action_at_term_end` for the new contract term is set to `renew`. + \* cancel - Contract term completes and subscription is canceled. + + deprecated: false + enum: + - renew + - evergreen + - cancel + cancellation_cutoff_period: + type: integer + description: | + The number of days before [`contract_end`](contract_terms#contract_term_contract_end), during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure + format: int32 + deprecated: false + default: 0 + description: | + Parameters for contract_term + deprecated: false + subscription_items: + required: + - item_price_id + type: object + properties: + item_price_id: + type: array + description: | + The unique identifier of the item price. + items: + maxLength: 100 + type: string + deprecated: false + quantity: + type: array + description: | + The quantity of the item purchased + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + unit_price: + type: array + description: | + The price/per unit price of the item. When not provided, [the value set](/docs/api/item_prices?prod_cat_ver=2#item_price_attributes) for the item price is used. This is only applicable when the `pricing_model` of the item price is `flat_fee` or `per_unit`. Also, it is only allowed when [price overriding](https://www.chargebee.com/docs/price-override.html) is enabled for the site. The value depends on the type of currency. If `changes_scheduled_at` is in the past and a `unit_price` is not passed, then the item price's current unit price is considered even if the item price did not exist on the date as of when the change is scheduled. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + unit_price_in_decimal: + type: array + description: | + When [price overriding](https://www.chargebee.com/docs/2.0/price-override.html) is enabled for the site, the price or per-unit price of the item can be set here. The [value set for the item price](https://apidocs.chargebee.com/docs/api/item_prices#item_price_price) is used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + billing_cycles: + type: array + description: "For the plan-item price: \nthe value determines\ + \ the number of billing cycles the subscription runs before\ + \ canceling automatically. If not provided, then [the value\ + \ set](./item_prices?prod_cat_ver=2#item_price_attributes)\ + \ for the plan-item price is used. \n\nFor addon-item prices:\ + \ \nIf [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html)\ + \ are enabled then this is the number of subscription billing\ + \ cycles for which the addon is included. If not provided,\ + \ then [the value set under attached addons](./attached_items?prod_cat_ver=2#attached_item_attributes)\ + \ is used. Further, if that value is not provided, then [the\ + \ value set for the addon-item price](./item_prices?prod_cat_ver=2#item_price_attributes)\ + \ is used.\n" + items: + minimum: 0 + type: integer + format: int32 + deprecated: false + trial_end: + type: array + description: | + The date/time when the trial period of the item ends. This applies to plan-items. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + service_period_days: + type: array + description: | + The service period of the item in days from the day of charge. + items: + maximum: 730 + minimum: 1 + type: integer + format: int32 + deprecated: false + charge_on_event: + type: array + items: + type: string + description: | + When `charge_on_option` option is set to `on_event`, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items. \* contract_termination - when a contract term is [terminated](./subscriptions?prod_cat_ver=2#cancel_subscription_for_items_contract_term_cancel_option). \* subscription_trial_start - the time when the trial period of the subscription begins. \* plan_activation - same as subscription activation, but also includes the case when the plan-item of the subscription is changed. \* subscription_activation - the moment a subscription enters an `active` or `non-renewing` state. Also includes reactivations of canceled subscriptions. \* subscription_creation - the time of creation of the subscription. + deprecated: false + enum: + - subscription_creation + - subscription_trial_start + - plan_activation + - subscription_activation + - contract_termination + charge_once: + type: array + description: | + Indicates if the charge-item is to be charged only once or each time the `charge_on_event` occurs. This parameter only applies to charge-items. + items: + type: boolean + deprecated: false + charge_on_option: + type: array + items: + type: string + description: | + Indicates when the charge-item is to be charged. This parameter only applies to charge-items. \* on_event - The item is charged at the occurrence of the event specified as `charge_on_event`. \* immediately - The item is charged immediately on being added to the subscription. + deprecated: false + enum: + - immediately + - on_event + description: | + Parameters for subscription_items + deprecated: false + discounts: + required: + - apply_on + - duration_type + type: object + properties: + apply_on: + type: array + items: + type: string + description: | + The amount on the invoice to which the discount is applied. \* invoice_amount - The discount is applied to the invoice `sub_total`. \* specific_item_price - The discount is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id`. + deprecated: false + enum: + - invoice_amount + - specific_item_price + duration_type: + type: array + items: + type: string + description: | + Specifies the time duration for which this discount is attached to the subscription. \* forever - The discount is attached to the subscription and applied on the invoices till it is [explicitly removed](/docs/api/subscriptions?prod_cat_ver=2#update_subscription_for_items_discounts_operation_type). \* limited_period - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period` and `period_unit`. \* one_time - The discount stays attached to the subscription till it is applied on an invoice **once**. It is removed after that from the subscription. + deprecated: false + default: forever + enum: + - one_time + - forever + - limited_period + percentage: + type: array + description: | + The percentage of the original amount that should be deducted from it. Only applicable when `discount.type` is percentage. + items: + maximum: 100 + minimum: 0.01 + type: number + format: double + deprecated: false + amount: + type: array + description: | + The value of the discount. [The format of this value](https://apidocs.chargebee.com/docs/api?prod_cat_ver=2#currencies) depends on the kind of currency. This is only applicable when `discount.type` is `fixed_amount`. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + period: + type: array + description: | + The duration of time for which the discount is attached to the subscription, in `period_units`. Applicable only when `duration_type` is `limited_period`. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + period_unit: + type: array + items: + type: string + description: | + The unit of time for `period`. Applicable only when `duration_type` is `limited_period`. \* day - A period of 24 hours. \* week - A period of 7 days. \* month - A period of 1 calendar month. \* year - A period of 1 calendar year. + deprecated: false + enum: + - day + - week + - month + - year + included_in_mrr: + type: array + description: | + The discount is included in MRR calculations for your site. This attribute is only applicable when `duration_type` is `one_time` and when the [feature is enabled](https://www.chargebee.com/docs/reporting.html#dashboards_flexible-mrr-calculation) in Chargebee. Also, If the [site-level setting](https://www.chargebee.com/docs/reporting.html#chart_flexible-mrr-calculation) is to exclude one-time discounts from MRR calculations, this value is always returned `false`. + items: + type: boolean + deprecated: false + item_price_id: + type: array + description: | + The [id of the item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) in the subscription to which the discount is to be applied. Relevant only when `apply_on` = `specific_item_price`. + items: + maxLength: 100 + type: string + deprecated: false + description: | + Parameters for discounts + deprecated: false + item_tiers: + type: object + properties: + item_price_id: + type: array + description: | + The id of the item price for which the tier price is being overridden. + items: + maxLength: 100 + type: string + deprecated: false + starting_unit: + type: array + description: | + The lowest value in the quantity tier. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + ending_unit: + type: array + description: | + The highest value in the quantity tier. + items: + type: integer + format: int32 + deprecated: false + price: + type: array + description: | + The overridden price of the tier. The value depends on the [type of currency](./#handling_currency_units). + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + default: 0 + starting_unit_in_decimal: + type: array + description: | + The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal` of the next lower tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + ending_unit_in_decimal: + type: array + description: | + The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal` of the next higher tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + price_in_decimal: + type: array + description: | + The decimal representation of the per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. When the `pricing_model` is `stairstep`, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: | + Parameters for item_tiers + deprecated: false + entity_identifiers: + type: object + properties: + id: + type: array + description: | + The unique id for the `entity_identifier[i]` in Chargebee. This is required when `entity_identifier[operation][i]` is `update` or `delete`. + items: + maxLength: 40 + type: string + deprecated: false + scheme: + type: array + description: "The Peppol BIS scheme associated with the [vat_number](customers#customer_vat_number)\ + \ of the customer. This helps identify the specific type of\ + \ customer entity. For example, `DE:VAT` is used for a German\ + \ business entity while `DE:LWID45` is used for a German government\ + \ entity. The value must be from the list of possible values\ + \ and must correspond to the country provided under `billing_address.country`.\ + \ See [list of possible values](https://www.chargebee.com/docs/e-invoicing.html#supported-countries).\ + \ \n**Tip:**\n\n\nIf there is only one entity identifier\ + \ for the customer and the value is the same as `vat_number`,\ + \ then there is no need to provide the `entity_identifiers[]`\ + \ array. See [description for `entity_identifiers[]`](customers#customer_entity_identifiers).\n" + items: + maxLength: 50 + type: string + deprecated: false + value: + type: array + description: "The value of the `entity_identifier`. This identifies\ + \ the customer entity on the Peppol network. For example:\ + \ `10101010-STO-10`. \n**Tip:**\n\n\nIf there is only one\ + \ entity identifier for the customer and the value is the\ + \ same as `vat_number`, then there is no need to provide the\ + \ `entity_identifiers[]` array. See [description for `entity_identifiers[]`](customers#customer_entity_identifiers).\n" + items: + maxLength: 50 + type: string + deprecated: false + operation: + type: array + items: + type: string + description: | + The operation to be performed for the `entity_identifier`. \* create - Creates a new `entity_identifier` for the customer. \* update - Updates an existing `entity_identifier` for the customer. `entity_identifier[id]` must be provided in this case. \* delete - Deletes an existing `entity_identifier` for the customer. `entity_identifier[id]` must be provided in this case. + deprecated: false + enum: + - create + - update + - delete + standard: + type: array + description: "The standard used for specifying the `entity_identifier`\ + \ `scheme`. Currently, only `iso6523-actorid-upis` is supported\ + \ and is used by default when not provided. \n**Tip:**\n\n\ + \nIf there is only one entity identifier for the customer\ + \ and the value is the same as `vat_number`, then there is\ + \ no need to provide the `entity_identifiers[]` array. See\ + \ [description for `entity_identifiers[]`](customers#customer_entity_identifiers).\n" + items: + maxLength: 50 + type: string + deprecated: false + default: iso6523-actorid-upis + description: | + Parameters for entity_identifiers + deprecated: false + encoding: + billing_address: + style: deepObject + explode: true + card: + style: deepObject + explode: true + contract_term: + style: deepObject + explode: true + customer: + style: deepObject + explode: true + discounts: + style: deepObject + explode: true + entity_identifiers: + style: deepObject + explode: true + item_tiers: + style: deepObject + explode: true + shipping_address: + style: deepObject + explode: true + subscription: + style: deepObject + explode: true + subscription_items: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - hosted_page + type: object + properties: + hosted_page: + $ref: '#/components/schemas/HostedPage' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /hosted_pages/claim_gift: + post: + summary: Claim a Gift subscription + description: | + This API generates a hosted page URL to claim a gifted subscription. + operationId: claim_a_gift_subscription + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4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,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + redirect_url: + maxLength: 250 + type: string + description: "The customers will be redirected to this URL upon\ + \ successful checkout. The hosted page id and state will be passed\ + \ as parameters to this URL. \n\n**Note** :\n\n* Although the\ + \ customer will be redirected to the `redirect_url` after successful\ + \ checkout, we do not recommend relying on it for completing critical\ + \ post-checkout actions. This is because redirection may not happen\ + \ due to unforeseen reasons such as user closing the tab, or exiting\ + \ the browser, and so on. If there is any synchronization that\ + \ you are doing after the redirection, you will have to have a\ + \ backup. Chargebee recommends listening to appropriate webhooks\ + \ such as [`subscription_created`](https://apidocs.chargebee.com/docs/api/events#subscription_created)\ + \ or [`invoice_generated`](https://apidocs.chargebee.com/docs/api/events#invoice_generated)to\ + \ verify a successful checkout.\n* Redirect URL configured in\ + \ Settings \\> Hosted Pages Settings would be overriden by this\ + \ redirect URL.\n* *Eg :* *http://yoursite.com?id=* *\\\\&state=succeeded*\n* This parameter is not applicable for iframe\ + \ messaging.\n" + deprecated: false + gift: + required: + - id + type: object + properties: + id: + maxLength: 150 + type: string + description: | + Uniquely identifies a gift + deprecated: false + description: | + Parameters for gift + deprecated: false + customer: + type: object + properties: + locale: + maxLength: 50 + type: string + description: | + Determines which region-specific language Chargebee uses to communicate with the customer. In the absence of the locale attribute, Chargebee will use your site's default language for customer communication. + deprecated: false + description: | + Parameters for customer + deprecated: false + encoding: + customer: + style: deepObject + explode: true + gift: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - hosted_page + type: object + properties: + hosted_page: + $ref: '#/components/schemas/HostedPage' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /hosted_pages/checkout_existing_for_items: + post: + summary: Create checkout to update a subscription + description: "Create a Chargebee hosted page to accept payment details from\ + \ a customer and checkout to update the subscription.\n\nThe following steps\ + \ describe how best to use this API:\n\n1. Provide [item prices](./item_prices?prod_cat_ver=2),\ + \ [coupons](./coupons?prod_cat_ver=2) and a host of other details such as\ + \ billing and shipping addresses to be prefilled for the customer on the checkout\ + \ page.\n2. Send the customer to the Checkout `url` received in the response.\ + \ They can now add a payment method or use an existing one, to complete the\ + \ checkout.\n3. The subscription is updated and the customer is redirected\ + \ to the `redirect_url` with the `id` and `state` attributes passed as query\ + \ string parameters. \n Although the customer will be redirected to the\ + \ `redirect_url` after successful checkout, we do not recommend relying on\ + \ it for completing critical post-checkout actions. This is because redirection\ + \ may not happen due to unforeseen reasons. Chargebee recommends listening\ + \ to appropriate webhooks such as [subscription_created](./events#subscription_created)\ + \ or [invoice_generated](./events#invoice_generated) to verify a successful\ + \ checkout.\n4. [Retrieve the hosted page](./hosted_pages?prod_cat_ver=2#retrieve_a_hosted_page)\ + \ at this stage to get the subscription and invoice details.\n\n\n\n" + operationId: create_checkout_to_update_a_subscription + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0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]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + layout: + type: string + description: | + Specifies the checkout layout that overrides the default checkout layout configured in the Checkout \& Self-Serve Portal settings. . \* in_app - Indicates in-app checkout version \* full_page - Indicates full page checkout version + deprecated: false + enum: + - in_app + - full_page + mandatory_items_to_remove: + type: array + description: | + Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver=2) that are to be removed from the subscription. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + replace_items_list: + type: boolean + description: | + If `true` then the existing `subscription_items` list for the subscription is replaced by the one provided. If `false` then the provided `subscription_items` list gets added to the existing list. + deprecated: false + default: false + invoice_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The document date displayed on the invoice PDF. The default value is the current date. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. Moreover, if `create_pending_invoices` is set to `true`, and if the site is configured to set invoice dates to date of closing, then upon invoice closure, this date is changed to the invoice closing date. taxes and line_item_taxes are computed based on the tax configuration as of `invoice_date`. When passing this parameter, the following prerequisites must be met: + + * `invoice_date` must be in the past. + * `invoice_date` is not more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December. + * It is not earlier than `changes_scheduled_at`, `reactivate_from`, or `trial_end`. + * `invoice_immediately` is `true`. + . + format: unix-time + deprecated: false + billing_cycles: + minimum: 0 + type: integer + description: | + Billing cycles set for plan-item price is used by default. + format: int32 + deprecated: false + terms_to_charge: + minimum: 1 + type: integer + description: | + The number of subscription billing cycles to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html). If a new term is started for the subscription due to this API call, then `terms_to_charge` is inclusive of this new term. See description for the `force_term_reset` parameter to learn more about when a subscription term is reset. + format: int32 + deprecated: false + reactivate_from: + pattern: "^[0-9]{10}$" + type: integer + description: "If the subscription `status` is `cancelled` and it\ + \ is being reactivated via this operation, this is the date/time\ + \ at which the subscription should be reactivated. \n**Note:**\ + \ It is recommended not to pass this parameter along with `changed_scheduled_at`.\ + \ `reactivate_from` can be backdated (set to a value in the past).\ + \ Use backdating when the subscription has been reactivated already\ + \ but its billing has been delayed. Backdating is allowed only\ + \ when the following prerequisites are met:\n\n* Backdating must\ + \ be enabled for subscription reactivation operations.\n* The\ + \ current day of the month does not exceed the limit set in Chargebee\ + \ for backdating subscription change. This limit is the day of\ + \ the month by which the accounting for the previous month must\ + \ be closed.\n* The date is on or after the last date/time any\ + \ of the product catalog items of the subscription were changed.\n\ + * The date is not more than duration X into the past where X is\ + \ the billing period of the plan. For example, if the period of\ + \ the plan in the subscription is 2 months and today is 14th April,\ + \ `changes_scheduled_at` cannot be earlier than 14th February.\n\ + .\n" + format: unix-time + deprecated: false + billing_alignment_mode: + type: string + description: | + Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date) chosen for the site for calendar billing. Only applicable when using calendar billing. \* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly.. \* delayed - Subscription period will be aligned with the configured billing date at the next renewal. + deprecated: false + enum: + - immediate + - delayed + coupon_ids: + type: array + description: | + List of coupons to be applied to this subscription. You can provide coupon ids or [coupon codes](https://apidocs.chargebee.com/docs/api/coupon_codes). + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + reactivate: + type: boolean + description: | + This parameter is only relevant for `cancelled` subscriptions. When set to `true`, it activates the canceled subscription; otherwise, subscription changes are applied without altering its `status`. Additionally, if not explicitly set and the `subscription_items` provided in the API differ from the existing items, the subscription will still be reactivated. + deprecated: false + force_term_reset: + type: boolean + description: "Say the subscription has the renewal date as 28th\ + \ of every month. When the plan-item price of the subscription\ + \ is set to one that has the same billing period as the current\ + \ plan-item price, the subscription change does not change the\ + \ term. In other words, the subscription still renews on the 28th.\ + \ Passing this parameter as `true` will have the subscription\ + \ reset its term to the current date (provided `end_of_term` is\ + \ false). \n**Note**: When the new plan-item price has a billing\ + \ period different from the current plan-item price of the subscription,\ + \ the term is always reset, regardless of the value passed for\ + \ this parameter.\n" + deprecated: false + default: false + redirect_url: + maxLength: 250 + type: string + description: "The customers will be redirected to this URL upon\ + \ successful checkout. The hosted page id and state will be passed\ + \ as parameters to this URL. \n\n**Note** :\n\n* Although the\ + \ customer will be redirected to the `redirect_url` after successful\ + \ checkout, we do not recommend relying on it for completing critical\ + \ post-checkout actions. This is because redirection may not happen\ + \ due to unforeseen reasons such as user closing the tab, or exiting\ + \ the browser, and so on. If there is any synchronization that\ + \ you are doing after the redirection, you will have to have a\ + \ backup. Chargebee recommends listening to appropriate webhooks\ + \ such as [`subscription_created`](https://apidocs.chargebee.com/docs/api/events#subscription_created)\ + \ or [`invoice_generated`](https://apidocs.chargebee.com/docs/api/events#invoice_generated)to\ + \ verify a successful checkout.\n* Redirect URL configured in\ + \ Settings \\> Hosted Pages Settings would be overriden by this\ + \ redirect URL.\n* *Eg :* *http://yoursite.com?id=* *\\\\&state=succeeded*\n* This parameter is not applicable for iframe\ + \ messaging.\n" + deprecated: false + cancel_url: + maxLength: 250 + type: string + description: "The customers will be redirected to this URL upon\ + \ canceling checkout. The hosted page id and state will be passed\ + \ as parameters to this URL. \n\n**Note** :\n\n* Cancel URL\ + \ configured in Settings \\> Hosted Pages Settings would be overriden\ + \ by this cancel URL. \n *Eg : http://yoursite.com?id=\\\\&state=cancelled*\n* This parameter is not applicable for iframe\ + \ messaging and [in-app](https://www.chargebee.com/docs/2.0/checkout.html)\ + \ checkout.\n" + deprecated: false + pass_thru_content: + maxLength: 2048 + type: string + description: | + You can pass through any content specific to the hosted page request and get it back after user had submitted the hosted page. + deprecated: false + allow_offline_payment_methods: + type: boolean + description: | + Allow the customer to select an offline payment method during checkout. The choice of payment methods can be configured via the Chargebee UI. + deprecated: false + subscription: + required: + - id + type: object + properties: + id: + maxLength: 50 + type: string + description: | + A unique and immutable identifier for the subscription. If not provided, it is autogenerated. + deprecated: false + start_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The new start date of a `future` subscription. Applicable only for `future` subscriptions. + format: unix-time + deprecated: false + trial_end: + pattern: "^[0-9]{10}$" + type: integer + description: | + The time at which the trial has ended or will end for the subscription. This is only allowed when the subscription `status` is `future`, `in_trial`, or `cancelled`. Also, the value must not be earlier than `changes_scheduled_at` or `start_date`. **Note** : This parameter can be backdated (set to a value in the past) only when the subscription is in `cancelled` or `in_trial` `status`. Do this to keep a record of when the trial ended in case it ended at some point in the past. When `trial_end` is backdated, the subscription immediately goes into `active` or `non_renewing` status. This parameter overrides the [`item_price_trial_period`](/docs/api/item_prices#item_price_trial_period) directly. + format: unix-time + deprecated: false + auto_collection: + type: string + description: | + Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property. \* off - Automatic collection of charges will not be made for this subscription. Use this for offline payments. \* on - Whenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available. + deprecated: false + enum: + - "on" + - "off" + offline_payment_method: + type: string + description: | + The preferred offline payment method for the subscription. \* uk_automated_bank_transfer - UK Automated Bank Transfer \* jp_automated_bank_transfer - JP Automated Bank Transfer \* bank_transfer - Bank Transfer \* us_automated_bank_transfer - US Automated Bank Transfer \* boleto - Boleto \* no_preference - No Preference \* sepa_credit - SEPA Credit \* mx_automated_bank_transfer - MX Automated Bank Transfer \* ach_credit - ACH Credit \* custom - Custom \* eu_automated_bank_transfer - EU Automated Bank Transfer \* cash - Cash \* check - Check + deprecated: false + enum: + - no_preference + - cash + - check + - bank_transfer + - ach_credit + - sepa_credit + - boleto + - us_automated_bank_transfer + - eu_automated_bank_transfer + - uk_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + - custom + invoice_notes: + maxLength: 2000 + type: string + description: | + A customer-facing note added to all invoices associated with this subscription. This note is one among [all the notes](/docs/api/invoices#invoice_notes) displayed on the invoice PDF. + deprecated: false + contract_term_billing_cycle_on_renewal: + maximum: 100 + minimum: 1 + type: integer + description: | + Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles` or a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms). + format: int32 + deprecated: false + additionalProperties: true + description: | + Parameters for subscription + deprecated: false + customer: + type: object + properties: + vat_number: + maxLength: 20 + type: string + description: | + The VAT/tax registration number for the customer. For customers with [billing_address](customers#customer_billing_address) `country` as `XI` (which is **United Kingdom - Northern Ireland** ), the first two characters of the [full VAT + number](https://en.wikipedia.org/wiki/VAT_identification_number) can be overridden by setting [vat_number_prefix](customers#customer_vat_number_prefix). + deprecated: false + vat_number_prefix: + maxLength: 10 + type: string + description: "An overridden value for the first two characters\ + \ of the [full VAT\nnumber](https://en.wikipedia.org/wiki/VAT_identification_number).\ + \ Only applicable specifically for customers with [billing_address](customers#customer_billing_address)\ + \ `country` as `XI` (which is **United Kingdom - Northern\ + \ Ireland** ). \n\nWhen you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or have [manually\nenabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, you have the option of setting\ + \ [billing_address](customers#customer_billing_address) `country`\ + \ as `XI`. That's the code for **United Kingdom - Northern\n\ + Ireland** . The first two characters of the VAT number in\ + \ such a case is `XI` by default. However, if the VAT number\ + \ was registered in UK, the value should be `GB`. Set `vat_number_prefix`\ + \ to `GB` for such cases.\n" + deprecated: false + is_einvoice_enabled: + type: boolean + description: "Determines whether the customer is e-invoiced.\ + \ When set to `true` or not set to any value, the customer\ + \ is e-invoiced so long as e-invoicing is enabled for their\ + \ country (`billing_address.country`). When set to `false`,\ + \ the customer is not e-invoiced even if e-invoicing is enabled\ + \ for their country. \n**Tip:**\n\n\nIt is possible to set\ + \ a value for this flag even when E-Invoicing is disabled.\ + \ However, it comes into effect only when E-Invoicing is enabled.\n" + deprecated: false + entity_identifier_scheme: + maxLength: 50 + type: string + description: "The Peppol BIS scheme associated with the [vat_number](customers#customer_vat_number)\ + \ of the customer. This helps identify the specific type of\ + \ customer entity. For example, `DE:VAT` is used for a German\ + \ business entity while `DE:LWID45` is used for a German government\ + \ entity. The value must be from the list of possible values\ + \ and must correspond to the country provided under `billing_address.country`.\ + \ See [list of possible values](https://www.chargebee.com/docs/e-invoicing.html#supported-countries).\ + \ \n**Tip:**\n\n\nIf there are additional entity identifiers\ + \ for the customer not associated with the `vat_number`, they\ + \ can be provided as the `entity_identifiers[]` array.\n" + deprecated: false + entity_identifier_standard: + maxLength: 50 + type: string + description: "The standard used for specifying the `entity_identifier_scheme`.\ + \ Currently only `iso6523-actorid-upis` is supported and is\ + \ used by default when not provided. \n**Tip:**\n\n\nIf there\ + \ are additional entity identifiers for the customer not associated\ + \ with the `vat_number`, they can be provided as the `entity_identifiers[]`\ + \ array.\n" + deprecated: false + default: iso6523-actorid-upis + additionalProperties: true + description: | + Parameters for customer + deprecated: false + card: + type: object + properties: + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account in which this payment source is stored. + deprecated: false + description: | + Parameters for card + deprecated: false + contract_term: + type: object + properties: + action_at_term_end: + type: string + description: |+ + Action to be taken when the contract term completes. \* evergreen - Contract term completes and the subscription renews. \* renew - + * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](subscriptions#create_subscription_for_customer_contract_term_billing_cycle_on_renewal). + * The `action_at_term_end` for the new contract term is set to `renew`. + \* cancel - Contract term completes and subscription is canceled. + + deprecated: false + enum: + - renew + - evergreen + - cancel + cancellation_cutoff_period: + type: integer + description: | + The number of days before [`contract_end`](contract_terms#contract_term_contract_end), during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure + format: int32 + deprecated: false + default: 0 + description: | + Parameters for contract_term + deprecated: false + subscription_items: + required: + - item_price_id + type: object + properties: + item_price_id: + type: array + description: | + The unique identifier of the item price. + items: + maxLength: 100 + type: string + deprecated: false + quantity: + type: array + description: | + The quantity of the item purchased + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + unit_price: + type: array + description: | + The price/per unit price of the item. When not provided, [the value set](/docs/api/item_prices?prod_cat_ver=2#item_price_attributes) for the item price is used. This is only applicable when the `pricing_model` of the item price is `flat_fee` or `per_unit`. Also, it is only allowed when [price overriding](https://www.chargebee.com/docs/price-override.html) is enabled for the site. The value depends on the type of currency. If `changes_scheduled_at` is in the past and a `unit_price` is not passed, then the item price's current unit price is considered even if the item price did not exist on the date as of when the change is scheduled. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + unit_price_in_decimal: + type: array + description: | + When [price overriding](https://www.chargebee.com/docs/price-override.html) is enabled for the site, the price or per-unit price of the item can be set here. The [value set for the item price](/docs/api/item_prices#item_price_price) is used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api#handling_currency_units) is enabled. If `changes_scheduled_at` is in the past and a `unit_price_in_decimal` is not passed, then the item price's current unit price is considered even if the item price did not exist on the date as of when the change is scheduled. + items: + maxLength: 39 + type: string + deprecated: false + billing_cycles: + type: array + description: "For the plan-item price: \nthe value determines\ + \ the number of billing cycles the subscription runs before\ + \ canceling automatically. If not provided, then [the value\ + \ set](./item_prices?prod_cat_ver=2#item_price_attributes)\ + \ for the plan-item price is used. \n\nFor addon-item prices:\ + \ \nIf [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html)\ + \ are enabled then this is the number of subscription billing\ + \ cycles for which the addon is included. If not provided,\ + \ then [the value set under attached addons](./attached_items?prod_cat_ver=2#attached_item_attributes)\ + \ is used. Further, if that value is not provided, then [the\ + \ value set for the addon-item price](./item_prices?prod_cat_ver=2#item_price_attributes)\ + \ is used.\n" + items: + minimum: 0 + type: integer + format: int32 + deprecated: false + trial_end: + type: array + description: | + The date/time when the trial period of the item ends. This applies to plan-items. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + service_period_days: + type: array + description: | + The service period of the item in days from the day of charge. + items: + maximum: 730 + minimum: 1 + type: integer + format: int32 + deprecated: false + charge_on_event: + type: array + items: + type: string + description: | + When `charge_on_option` option is set to `on_event`, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items. \* contract_termination - when a contract term is [terminated](./subscriptions?prod_cat_ver=2#cancel_subscription_for_items_contract_term_cancel_option). \* subscription_trial_start - the time when the trial period of the subscription begins. \* plan_activation - same as subscription activation, but also includes the case when the plan-item of the subscription is changed. \* subscription_activation - the moment a subscription enters an `active` or `non-renewing` state. Also includes reactivations of canceled subscriptions. \* subscription_creation - the time of creation of the subscription. + deprecated: false + enum: + - subscription_creation + - subscription_trial_start + - plan_activation + - subscription_activation + - contract_termination + charge_once: + type: array + description: | + Indicates if the charge-item is to be charged only once or each time the `charge_on_event` occurs. This parameter only applies to charge-items. + items: + type: boolean + deprecated: false + charge_on_option: + type: array + items: + type: string + description: | + Indicates when the charge-item is to be charged. This parameter only applies to charge-items. \* on_event - The item is charged at the occurrence of the event specified as `charge_on_event`. \* immediately - The item is charged immediately on being added to the subscription. + deprecated: false + enum: + - immediately + - on_event + description: | + Parameters for subscription_items + deprecated: false + discounts: + required: + - apply_on + - duration_type + - operation_type + type: object + properties: + apply_on: + type: array + items: + type: string + description: | + The amount on the invoice to which the discount is applied. \* invoice_amount - The discount is applied to the invoice `sub_total`. \* specific_item_price - The discount is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id`. + deprecated: false + enum: + - invoice_amount + - specific_item_price + duration_type: + type: array + items: + type: string + description: | + Specifies the time duration for which this discount is attached to the subscription. \* forever - The discount is attached to the subscription and applied on the invoices till it is [explicitly removed](/docs/api/subscriptions?prod_cat_ver=2#update_subscription_for_items_discounts_operation_type). \* limited_period - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period` and `period_unit`. \* one_time - The discount stays attached to the subscription till it is applied on an invoice **once**. It is removed after that from the subscription. + deprecated: false + default: forever + enum: + - one_time + - forever + - limited_period + percentage: + type: array + description: | + The percentage of the original amount that should be deducted from it. Only applicable when `discount.type` is percentage. + items: + maximum: 100 + minimum: 0.01 + type: number + format: double + deprecated: false + amount: + type: array + description: | + The value of the discount. [The format of this value](https://apidocs.chargebee.com/docs/api?prod_cat_ver=2#currencies) depends on the kind of currency. This is only applicable when `discount.type` is `fixed_amount`. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + period: + type: array + description: | + The duration of time for which the discount is attached to the subscription, in `period_units`. Applicable only when `duration_type` is `limited_period`. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + period_unit: + type: array + items: + type: string + description: | + The unit of time for `period`. Applicable only when `duration_type` is `limited_period`. \* day - A period of 24 hours. \* week - A period of 7 days. \* month - A period of 1 calendar month. \* year - A period of 1 calendar year. + deprecated: false + enum: + - day + - week + - month + - year + included_in_mrr: + type: array + description: | + The discount is included in MRR calculations for your site. This attribute is only applicable when `duration_type` is `one_time` and when the [feature is enabled](https://www.chargebee.com/docs/reporting.html#dashboards_flexible-mrr-calculation) in Chargebee. Also, If the [site-level setting](https://www.chargebee.com/docs/reporting.html#chart_flexible-mrr-calculation) is to exclude one-time discounts from MRR calculations, this value is always returned `false`. + items: + type: boolean + deprecated: false + item_price_id: + type: array + description: | + The [id of the item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) in the subscription to which the discount is to be applied. Relevant only when `apply_on` = `specific_item_price`. + items: + maxLength: 100 + type: string + deprecated: false + operation_type: + type: array + items: + type: string + description: | + The operation to be carried out for the discount. \* add - The discount is attached to the subscription. \* remove - The discount (given by `discounts[id]`) is removed from the subscription. Subsequent invoices will no longer have the discount applied. **Tip:** If you want to replace a discount, `remove` it and `add` another in the same API call. + deprecated: false + enum: + - add + - remove + id: + type: array + description: | + An immutable unique id for the discount. It is always auto-generated. + items: + maxLength: 50 + type: string + deprecated: false + description: | + Parameters for discounts + deprecated: false + item_tiers: + type: object + properties: + item_price_id: + type: array + description: | + The id of the item price for which the tier price is being overridden. + items: + maxLength: 100 + type: string + deprecated: false + starting_unit: + type: array + description: | + The lowest value in the quantity tier. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + ending_unit: + type: array + description: | + The highest value in the quantity tier. + items: + type: integer + format: int32 + deprecated: false + price: + type: array + description: | + The overridden price of the tier. The value depends on the [type of currency](./#handling_currency_units). + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + default: 0 + starting_unit_in_decimal: + type: array + description: | + The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal` of the next lower tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + ending_unit_in_decimal: + type: array + description: | + The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal` of the next higher tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + price_in_decimal: + type: array + description: | + The decimal representation of the per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. When the `pricing_model` is `stairstep`, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: | + Parameters for item_tiers + deprecated: false + entity_identifiers: + type: object + properties: + id: + type: array + description: | + The unique id for the `entity_identifier[i]` in Chargebee. This is required when `entity_identifier[operation][i]` is `update` or `delete`. + items: + maxLength: 40 + type: string + deprecated: false + scheme: + type: array + description: "The Peppol BIS scheme associated with the [vat_number](customers#customer_vat_number)\ + \ of the customer. This helps identify the specific type of\ + \ customer entity. For example, `DE:VAT` is used for a German\ + \ business entity while `DE:LWID45` is used for a German government\ + \ entity. The value must be from the list of possible values\ + \ and must correspond to the country provided under `billing_address.country`.\ + \ See [list of possible values](https://www.chargebee.com/docs/e-invoicing.html#supported-countries).\ + \ \n**Tip:**\n\n\nIf there is only one entity identifier\ + \ for the customer and the value is the same as `vat_number`,\ + \ then there is no need to provide the `entity_identifiers[]`\ + \ array. See [description for `entity_identifiers[]`](customers#customer_entity_identifiers).\n" + items: + maxLength: 50 + type: string + deprecated: false + value: + type: array + description: "The value of the `entity_identifier`. This identifies\ + \ the customer entity on the Peppol network. For example:\ + \ `10101010-STO-10`. \n**Tip:**\n\n\nIf there is only one\ + \ entity identifier for the customer and the value is the\ + \ same as `vat_number`, then there is no need to provide the\ + \ `entity_identifiers[]` array. See [description for `entity_identifiers[]`](customers#customer_entity_identifiers).\n" + items: + maxLength: 50 + type: string + deprecated: false + operation: + type: array + items: + type: string + description: | + The operation to be performed for the `entity_identifier`. \* create - Creates a new `entity_identifier` for the customer. \* update - Updates an existing `entity_identifier` for the customer. `entity_identifier[id]` must be provided in this case. \* delete - Deletes an existing `entity_identifier` for the customer. `entity_identifier[id]` must be provided in this case. + deprecated: false + enum: + - create + - update + - delete + standard: + type: array + description: "The standard used for specifying the `entity_identifier`\ + \ `scheme`. Currently, only `iso6523-actorid-upis` is supported\ + \ and is used by default when not provided. \n**Tip:**\n\n\ + \nIf there is only one entity identifier for the customer\ + \ and the value is the same as `vat_number`, then there is\ + \ no need to provide the `entity_identifiers[]` array. See\ + \ [description for `entity_identifiers[]`](customers#customer_entity_identifiers).\n" + items: + maxLength: 50 + type: string + deprecated: false + default: iso6523-actorid-upis + description: | + Parameters for entity_identifiers + deprecated: false + encoding: + card: + style: deepObject + explode: true + contract_term: + style: deepObject + explode: true + customer: + style: deepObject + explode: true + discounts: + style: deepObject + explode: true + entity_identifiers: + style: deepObject + explode: true + item_tiers: + style: deepObject + explode: true + subscription: + style: deepObject + explode: true + subscription_items: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - hosted_page + type: object + properties: + hosted_page: + $ref: '#/components/schemas/HostedPage' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /hosted_pages/pre_cancel: + post: + summary: Create a pre-cancel hosted page + description: "Creates a `hosted_page` resource of `type` `pre_cancel`. Route\ + \ canceling users to this page to provide them a retention experience and\ + \ start saving revenue. \nThe hosted page is created in accordance with the\ + \ retention experience [configured in the Chargebee Retention app](https://help.brightback.com/article/239-steps-to-get-brightback-ready-to-launch-for-chargebee-billing-merchants),\ + \ along with the data provided as input to this endpoint. Call the endpoint\ + \ before your customer clicks the **Cancel** button, and when they do, route\ + \ them to the [url](https://apidocs.chargebee.com/docs/api/hosted_pages#hosted_page_url)\ + \ in the endpoint response.\n" + operationId: create_a_pre-cancel_hosted_page + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + pass_thru_content: + maxLength: 2048 + type: string + description: | + Additional data to be passed to Chargebee Retention. Only the value of `pass_thru_content.custom` is sent to Chargebee Retention. It is sent as the value of the [`custom` property](https://help.brightback.com/article/43-installing-brightback). The fields provided in `pass_thru_content.custom` must be preconfigured in Chargebee Retention. + + Although only `pass_thru_content.custom` is sent to Chargebee Retention, all of `pass_thru_content` is stored by Chargebee billing and is retrievable as an [attribute](/docs/api/hosted_pages#hosted_page_pass_thru_content) of the `hosted_page`. + . + deprecated: false + cancel_url: + maxLength: 250 + type: string + description: | + The customer is sent to this URL if they finally decide to cancel the subscription, despite the attempt to retain them. + deprecated: false + redirect_url: + maxLength: 250 + type: string + description: | + The customer is sent to this URL upon successful retention. In other words, this is the page to which the customer is sent when they decide **not** to cancel the subscription. + deprecated: false + subscription: + required: + - id + type: object + properties: + id: + maxLength: 50 + type: string + description: | + The unique ID of the subscription which the customer wants to cancel. + deprecated: false + description: | + Parameters for subscription + deprecated: false + encoding: + subscription: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - hosted_page + type: object + properties: + hosted_page: + $ref: '#/components/schemas/HostedPage' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /hosted_pages/{hosted-page-id}/acknowledge: + post: + summary: Acknowledge a hosted page + description: "When a hosted page is successfully completed by the user and processed\ + \ by Chargebee, its [`state`](hosted_pages#hosted_page_state) is automatically\ + \ changed to `succeeded`. Acknowledging a hosted page confirms that you have\ + \ moved the customer details from Chargebee into your system and are ready\ + \ to fulfill it. This API is used to acknowledge the hosted page in `succeeded`\ + \ state and change its state to `acknowledged`. \n\n**Note:** The hosted\ + \ page status must be succeeded for this API call to be allowed.\n" + operationId: acknowledge_a_hosted_page + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4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0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: hosted-page-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - hosted_page + type: object + properties: + hosted_page: + $ref: '#/components/schemas/HostedPage' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /hosted_pages/retrieve_agreement_pdf: + post: + summary: Retrieve Direct Debit Agreement PDF + description: | + This is applicable only for Direct Debit via SEPA, Bacs, Bg Autogiro, BECS (for both Australia and New Zealand) and PAD. For Direct Debit, the customer needs to accept an agreement that allows the merchant to debit their bank account. This agreement PDF allows you to easily display scheme-rules compliant Direct Debit mandates to your customers. + + This API retrieves the redirect link to the corresponding agreement for customers. The agreement PDF can be your "Thank You" page or sent by email to customers. Communicating this PDF to your customers is mandatory. + + Customer locale is used to generate the PDF in the required language. If a customer language is not supported, the PDF is generated in English. Checkout the [list of languages](https://developer.gocardless.com/api-reference/#mandate-pdfs-create-a-mandate-pdf) supported by GoCardless. + operationId: retrieve_direct_debit_agreement_pdf + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(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-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - payment_source_id + type: object + properties: + payment_source_id: + maxLength: 40 + type: string + description: | + Payment source to be used for this payment. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - hosted_page + type: object + properties: + hosted_page: + $ref: '#/components/schemas/HostedPage' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /hosted_pages/{hosted-page-id}: + get: + summary: Retrieve a hosted page + description: |+ + When you retrieve a hosted page whose `status` is `successful`, the `content` attribute has the following objects based on the `type` of the hosted page. + + |---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| + | **`type` of hosted page** | **`content` attribute constituents** | + | `checkout_new` | * `customer`: the object representing the details of the [Customer](/docs/api/customers#customer_attributes) for whom the subscription was created. * `subscription`: the new Subscription object created. * `card`: the [Card](/docs/api/cards#card_attributes) object if the [payment method](/docs/api/customers#customer_payment_method) `type` used was `card`. * `invoice`: the Invoice object, if an invoice was generated. | + | `checkout_existing` | * `customer`: the object representing the details of the [Customer](/docs/api/customers#customer_attributes) whose subscription was changed. * `subscription`: the updated Subscription object created. * `card`: the [Card](/docs/api/cards#card_attributes) object if the [payment method](/docs/api/customers#customer_payment_method) `type` used was `card`. * `invoice`: the Invoice object, if an invoice was generated for the subscription change. | + | `update_payment_method` | * `customer`: the object representing the details of the [Customer](/docs/api/customers#customer_attributes) whose subscription was changed. * `card`: the [Card](/docs/api/cards#card_attributes) object if the new [payment method](/docs/api/customers#customer_payment_method) added was of `type` `card`. | + | `pre_cancel` | `retention`: Use the `bypass` flag in this object to route the cancellation flow to the merchants' portal or the Chargebee Retention. * If `bypass` flag is `true`, you should route the end-customers to your native cancellation flow. * If the `bypass` flag is `false`, you should route the end-customers to the hosted page URL. **Note:** Retention is currently in `beta`. To enable Retention, [Contact Support.](https://support.chargebee.com/support/home) | + | `collect_now` | * `transactions`: this object should contain a list of [transactions](/docs/api/transactions#transaction_attributes) triggered from the `collect_now` hosted page. Each transaction in the list should be represented as an array that includes relevant information about the transaction, such as transaction ID, customer ID, amount, currency, payment method, and any other relevant details. * `customer`: this object should contain the customer record associated with the transaction. The key, `customer_id` is used to link the transaction to the corresponding customer record. | + + operationId: retrieve_a_hosted_page + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(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:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: hosted-page-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - hosted_page + type: object + properties: + hosted_page: + $ref: '#/components/schemas/HostedPage' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /hosted_pages/manage_payment_sources: + post: + summary: Manage Payment Sources + description: | + This API generates a hosted page URL to add new or update existing payment sources for the customer. + operationId: manage_payment_sources + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))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|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + redirect_url: + maxLength: 250 + type: string + description: | + URL to redirect after payment method is added. + deprecated: false + customer: + required: + - id + type: object + properties: + id: + maxLength: 50 + type: string + description: | + Identifier of the customer. + deprecated: false + description: | + Parameters for customer + deprecated: false + card: + type: object + properties: + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account in which this payment source is stored. + deprecated: false + description: | + Parameters for card + deprecated: false + encoding: + card: + style: deepObject + explode: true + customer: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - hosted_page + type: object + properties: + hosted_page: + $ref: '#/components/schemas/HostedPage' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/renewal_estimate: + get: + summary: Subscription renewal estimate + description: | + This returns an estimate of the amount that will be charged when the subscription is billed next. The estimate is calculated based on the current recurring items of the subscription - plan, addons, and coupons. + + In the response, + + * **estimate.subscription_estimate** has the current subscription details like its status, next billing date, and so on. + * **estimate.invoice_estimate** has details of the invoice that will be generated at the next billing date. + + The generated invoice estimate will include all the balances - [Promotional Credits](https://www.chargebee.com/docs/promotional-credits.html), Refundable Credits, and Excess Payments - if any. If you don't want these balances to be included you can specify 'false' for the parameter *use_existing_balances*. + + To exclude the [delayed charges](https://www.chargebee.com/docs/charges.html) from the invoice estimate, specify 'false' for the parameter *include_delayed_charges*. + + **Note:** + + * This API will not generate a renewal invoice if an [advance invoice](https://www.chargebee.com/docs/advance-invoices.html) is already present for the subscription. + * For 'Non Renewing' subscriptions, only the [delayed charges](https://www.chargebee.com/docs/charges.html) will be included in the invoice estimate. + * This API is not supported for 'Cancelled' subscriptions. + * Only the subscription's charges will be included. If you have enabled the Consolidated invoicing feature, use the *Upcoming Invoices* estimate available for the Customer object to get the actual estimate invoice for the customer. + operationId: subscription_renewal_estimate + parameters: + - name: include_delayed_charges + in: query + description: "If true, all the unbilled charges will be included for the invoice\ + \ estimate." + required: false + deprecated: false + style: form + explode: true + schema: + type: boolean + deprecated: false + default: true + - name: use_existing_balances + in: query + description: "The generated invoice_estimate/next_invoice_estimate will include\ + \ all the balances - Promotional Credits, Refundable Credits, and Excess\ + \ Payments - if any. If you don’t want these balances to be included you\ + \ can specify 'false' for the parameter use_existing_balances." + required: false + deprecated: false + style: form + explode: true + schema: + type: boolean + deprecated: false + default: true + - name: ignore_scheduled_cancellation + in: query + description: "if true, ignores scheduled cancellation for non renewing subscription." + required: false + deprecated: false + style: form + explode: true + schema: + type: boolean + deprecated: false + default: false + - name: ignore_scheduled_changes + in: query + description: "If true, ignores all recurring charges scheduled during renewal." + required: false + deprecated: false + style: form + explode: true + schema: + type: boolean + deprecated: false + default: false + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0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 + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - estimate + type: object + properties: + estimate: + $ref: '#/components/schemas/Estimate' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /estimates/create_subscription_for_items: + post: + summary: Estimate for creating a customer and subscription + description: "Generates an estimate for creating a subscription when the customer\ + \ does not exist in Chargebee. This estimate API can be called when the customer\ + \ has not yet signed up and you want to preview how a new subscription would\ + \ look like for them.\n\n**Note:** Estimate operations do not make any changes\ + \ in Chargebee; hence this API does not create an actual `customer` or `subscription`\ + \ record. \n**See also**\n\n* [Estimate a purchase](https://apidocs.chargebee.com/docs/api/purchases#estimates_for_purchase):\ + \ an operation that estimates a `purchase` representing multiple subscriptions\ + \ bought together by a customer.\n\nThe response contains one or more of the\ + \ following objects:\n\n* `subscription_estimate`: The subscription details\ + \ like the status of the subscription (such as `in_trial` or `active`), next\ + \ billing date, and so on.\n* `invoice_estimate`:The details of the immediate\ + \ invoice, if there is one. If the subscription is created in `trial`/`future`\ + \ states, `invoice_estimate` is unavailable as no immediate invoice is generated.\n\ + * `next_invoice_estimate`:This is returned when an immediate invoice is not\ + \ generated. It contains the details of the invoice that will be generated\ + \ on the next billing date of the subscription.\n* `unbilled_charge_estimates`:\ + \ This contains the details of charges that have not been invoiced. This is\ + \ returned only if the `invoice_immediately` parameter is set to `false`.\n\ + \n\n\n" + operationId: estimate_for_creating_a_customer_and_subscription + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9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){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + billing_cycles: + minimum: 0 + type: integer + description: | + The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles [set for the plan-item price](https://apidocs.chargebee.com/docs/api/item_prices?prod_cat_ver=2#item_price_billing_cycles) is used. + format: int32 + deprecated: false + mandatory_items_to_remove: + type: array + description: | + Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver=2) that are to be removed from the subscription. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + terms_to_charge: + minimum: 1 + type: integer + description: | + The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html). + format: int32 + deprecated: false + billing_alignment_mode: + type: string + description: | + Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date) for Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site. \* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly.. \* delayed - Subscription period will be aligned with the configured billing date at the next renewal. + deprecated: false + enum: + - immediate + - delayed + coupon_ids: + type: array + description: | + List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + invoice_immediately: + type: boolean + description: "If there are charges raised immediately for the subscription,\ + \ this parameter specifies whether those charges are to be invoiced\ + \ immediately or added to [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html).\ + \ The default value is as per the [site settings](https://www.chargebee.com/docs/unbilled-charges.html#configuration).\ + \ \n**Note:** `invoice_immediately` only affects charges that\ + \ are raised at the time of execution of this API call. Any charges\ + \ scheduled to be raised in the future are not affected by this\ + \ parameter. .\n" + deprecated: false + invoice_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The document date displayed on the invoice PDF. By default, it is the date of creation of the invoice or, when Metered Billing is enabled, it can be the date of closing the invoice. Provide this value to backdate the invoice (set the invoice date to a value in the past). Backdating an invoice is done for reasons such as booking revenue for a previous date or when the non-recurring charge is effective as of a past date. `taxes` and `line_item_taxes` are computed based on the tax configuration as of this date. The date should not be more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December. + format: unix-time + deprecated: false + client_profile_id: + maxLength: 50 + type: string + description: | + Indicates the Client profile id for the customer. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. + deprecated: false + subscription: + type: object + properties: + id: + maxLength: 50 + type: string + description: | + A unique and immutable identifier for the subscription. If not provided, it is autogenerated. + deprecated: false + trial_end: + pattern: "^[0-9]{10}$" + type: integer + description: | + End of the trial period for the subscription. This overrides the trial period set for the plan-item. The value must be later than `start_date`. Set it to `0` to have no trial period. + format: unix-time + deprecated: false + start_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The date/time at which the subscription is to start. If not provided, the subscription starts immediately. You can provide a value in the past as well. This is called backdating the subscription creation and is done when the subscription has already been provisioned but its billing has been delayed. Backdating is allowed only when the following prerequisites are met: + + * Backdating is enabled for subscription creation operations. + * The current day of the month does not exceed the limit set in Chargebee for backdating such operations. This day is typically the day of the month by which the accounting for the previous month must be closed. + * The date is not more than duration X into the past, where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `start_date` cannot be earlier than 14th February. + format: unix-time + deprecated: false + free_period: + minimum: 1 + type: integer + description: | + The period of time by which the first term of the subscription is to be extended free-of-charge. The value must be in multiples of free_period_unit. + format: int32 + deprecated: false + free_period_unit: + type: string + description: | + The unit of time in multiples of which the free_period parameter is expressed. The value must be equal to or lower than the [period_unit](/docs/api/plans#create_a_plan_period_unit) attribute of the [plan](/docs/api/subscriptions#create_a_subscription_plan_id) chosen. \* year - Charge based on year(s) \* day - Charge based on day(s) \* month - Charge based on month(s) \* week - Charge based on week(s) + deprecated: false + enum: + - day + - week + - month + - year + contract_term_billing_cycle_on_renewal: + maximum: 100 + minimum: 1 + type: integer + description: | + Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles` or a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms). + format: int32 + deprecated: false + trial_end_action: + type: string + description: | + Applicable only when [End-of-trial Action](https://www.chargebee.com/docs/2.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions) has been enabled for the site. Whenever the subscription has a trial period, this attribute (parameter) is returned (required) and specifies the operation to be carried out for the subscription once the trial ends. \* activate_subscription - The subscription activates and charges are raised for non-metered items. \* cancel_subscription - The subscription cancels. \* plan_default - The action [configured for the site](https://www.chargebee.com/docs/trial_periods.html#how-to-define-the-end-of-trial-actions-for-subscriptions) at the time when the trial ends, takes effect. This is the default value when `trial_end_action` is defined for the plan. \* site_default - The action [configured for the site](https://www.chargebee.com/docs/trial_periods.html#how-to-define-the-end-of-trial-actions-for-subscriptions) at the time when the trial ends, takes effect. This is the default value when `trial_end_action` is **not** defined for the plan. + deprecated: false + enum: + - site_default + - plan_default + - activate_subscription + - cancel_subscription + description: | + Parameters for subscription + deprecated: false + billing_address: + type: object + properties: + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for billing_address + deprecated: false + shipping_address: + type: object + properties: + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for shipping_address + deprecated: false + customer: + type: object + properties: + vat_number: + maxLength: 20 + type: string + description: | + VAT number of this customer. If not provided then taxes are not calculated for the estimate. Applicable only when taxes are configured for the EU or UK region. VAT validation is not done for this. + deprecated: false + vat_number_prefix: + maxLength: 10 + type: string + description: "An overridden value for the first two characters\ + \ of the [full VAT\nnumber](https://en.wikipedia.org/wiki/VAT_identification_number).\ + \ Only applicable specifically for customers with [billing_address](customers#customer_billing_address)\ + \ `country` as `XI` (which is **United Kingdom - Northern\ + \ Ireland** ). \n\nWhen you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or have [manually\nenabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, you have the option of setting\ + \ [billing_address](customers#customer_billing_address) `country`\ + \ as `XI`. That's the code for **United Kingdom - Northern\n\ + Ireland** . The first two characters of the VAT number in\ + \ such a case is `XI` by default. However, if the VAT number\ + \ was registered in UK, the value should be `GB`. Set `vat_number_prefix`\ + \ to `GB` for such cases.\n" + deprecated: false + registered_for_gst: + type: boolean + description: | + Confirms that a customer is registered under GST. If set to `true` then the [Reverse Charge Mechanism](https://www.chargebee.com/docs/australian-gst.html#reverse-charge-mechanism) is applicable. This field is applicable only when Australian GST is configured for your site. + deprecated: false + taxability: + type: string + description: | + Specifies if the customer is liable for tax \* exempt - + + * Customer is exempted from tax. When using Chargebee's native [Taxes](https://www.chargebee.com/docs/tax.html) feature or when using the [TaxJar integration](https://www.chargebee.com/docs/taxjar.html), no other action is needed. + * However, when using our [Avalara integration](https://www.chargebee.com/docs/avalara.html), optionally, specify `entity_code` or `exempt_number` attributes if you use Chargebee's [AvaTax for Sales](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) or specify `exemption_details` attribute if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. Tax may still be applied by Avalara for certain values of `entity_code`/`exempt_number`/`exemption_details` based on the state/region/province of the taxable address. + + \* taxable - Computes tax for the customer based on the [site configuration](https://www.chargebee.com/docs/tax.html). In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero. + deprecated: false + default: taxable + enum: + - taxable + - exempt + entity_code: + type: string + description: | + The exemption category of the customer, for USA and Canada. Applicable if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption). \* med2 - US Medical Device Excise Tax with taxable sales tax \* med1 - US Medical Device Excise Tax with exempt sales tax \* b - State government \* c - Tribe/Status Indian/Indian Band \* a - Federal government \* f - Religious organization \* g - Resale \* d - Foreign diplomat \* e - Charitable or benevolent organization \* j - Direct pay permit \* k - Direct mail \* h - Commercial agricultural production \* i - Industrial production/manufacturer \* n - Local government \* l - Other or custom \* m - Educational organization \* r - Non-resident \* p - Commercial aquaculture \* q - Commercial Fishery + deprecated: false + enum: + - a + - b + - c + - d + - e + - f + - g + - h + - i + - j + - k + - l + - m + - "n" + - p + - q + - r + - med1 + - med2 + exempt_number: + maxLength: 100 + type: string + description: | + Any string value that will cause the sale to be exempted. Use this if your finance team manually verifies and tracks exemption certificates. Applicable if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption). + deprecated: false + exemption_details: + type: array + description: "Indicates the exemption information. You can customize\ + \ customer exemption based on specific Location, Tax level\ + \ (Federal, State, County and Local), Category of Tax or specific\ + \ Tax Name. This is applicable only if you use [Chargebee's\ + \ AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html)\ + \ integration. \nTo know more about what values you need\ + \ to provide, refer to this [Avalara's API document](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/exemption/).\n" + deprecated: false + items: {} + customer_type: + type: string + description: | + Indicates the type of the customer. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. \* business - When the purchase is made at a place of business \* residential - When the purchase is made by a customer for home use \* industrial - When the purchase is made by an industrial business \* senior_citizen - When the purchase is made by a customer who meets the jurisdiction requirements to be considered a senior citizen and qualifies for senior citizen tax breaks + deprecated: false + enum: + - residential + - business + - senior_citizen + - industrial + description: | + Parameters for customer + deprecated: false + contract_term: + type: object + properties: + action_at_term_end: + type: string + description: |+ + Action to be taken when the contract term completes. \* evergreen - Contract term completes and the subscription renews. \* renew - + * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](subscriptions#create_subscription_for_customer_contract_term_billing_cycle_on_renewal). + * The `action_at_term_end` for the new contract term is set to `renew`. + \* cancel - Contract term completes and subscription is canceled. + + deprecated: false + enum: + - renew + - evergreen + - cancel + cancellation_cutoff_period: + type: integer + description: | + The number of days before [`contract_end`](contract_terms#contract_term_contract_end), during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure + format: int32 + deprecated: false + default: 0 + description: | + Parameters for contract_term + deprecated: false + subscription_items: + required: + - item_price_id + type: object + properties: + item_price_id: + type: array + description: | + The unique identifier of the item price. + items: + maxLength: 100 + type: string + deprecated: false + quantity: + type: array + description: | + The quantity of the item purchased + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + unit_price: + type: array + description: | + The price/per unit price of the item. When not provided, [the value set](/docs/api/item_prices?prod_cat_ver=2#item_price_attributes) for the item price is used. This is only applicable when the `pricing_model` of the item price is `flat_fee` or `per_unit`. Also, it is only allowed when [price overriding](https://www.chargebee.com/docs/price-override.html) is enabled for the site. The value depends on the type of currency. If `changes_scheduled_at` is in the past and a `unit_price` is not passed, then the item price's current unit price is considered even if the item price did not exist on the date as of when the change is scheduled. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + unit_price_in_decimal: + type: array + description: | + When [price overriding](https://www.chargebee.com/docs/2.0/price-override.html) is enabled for the site, the price or per-unit price of the item can be set here. The [value set for the item price](https://apidocs.chargebee.com/docs/api/item_prices#item_price_price) is used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + billing_cycles: + type: array + description: "For the plan-item price: \nthe value determines\ + \ the number of billing cycles the subscription runs before\ + \ canceling automatically. If not provided, then [the value\ + \ set](./item_prices?prod_cat_ver=2#item_price_attributes)\ + \ for the plan-item price is used. \n\nFor addon-item prices:\ + \ \nIf [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html)\ + \ are enabled then this is the number of subscription billing\ + \ cycles for which the addon is included. If not provided,\ + \ then [the value set under attached addons](./attached_items?prod_cat_ver=2#attached_item_attributes)\ + \ is used. Further, if that value is not provided, then [the\ + \ value set for the addon-item price](./item_prices?prod_cat_ver=2#item_price_attributes)\ + \ is used.\n" + items: + minimum: 0 + type: integer + format: int32 + deprecated: false + trial_end: + type: array + description: | + The date/time when the trial period of the item ends. Applies to plan-items and----when [enabled](https://www.chargebee.com/docs/2.0/addons-trial.html)----addon-items as well. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + service_period_days: + type: array + description: | + The service period of the item in days from the day of charge. + items: + maximum: 730 + minimum: 1 + type: integer + format: int32 + deprecated: false + charge_on_event: + type: array + items: + type: string + description: | + When `charge_on_option` option is set to `on_event`, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items. \* contract_termination - when a contract term is [terminated](./subscriptions?prod_cat_ver=2#cancel_subscription_for_items_contract_term_cancel_option). \* subscription_trial_start - the time when the trial period of the subscription begins. \* plan_activation - same as subscription activation, but also includes the case when the plan-item of the subscription is changed. \* subscription_activation - the moment a subscription enters an `active` or `non-renewing` state. Also includes reactivations of canceled subscriptions. \* subscription_creation - the time of creation of the subscription. + deprecated: false + enum: + - subscription_creation + - subscription_trial_start + - plan_activation + - subscription_activation + - contract_termination + charge_once: + type: array + description: | + Indicates if the charge-item is to be charged only once or each time the `charge_on_event` occurs. This parameter only applies to charge-items. + items: + type: boolean + deprecated: false + charge_on_option: + type: array + items: + type: string + description: | + Indicates when the charge-item is to be charged. This parameter only applies to charge-items. \* on_event - The item is charged at the occurrence of the event specified as `charge_on_event`. \* immediately - The item is charged immediately on being added to the subscription. + deprecated: false + enum: + - immediately + - on_event + description: | + Parameters for subscription_items + deprecated: false + discounts: + required: + - apply_on + - duration_type + type: object + properties: + apply_on: + type: array + items: + type: string + description: | + The amount on the invoice to which the discount is applied. \* invoice_amount - The discount is applied to the invoice `sub_total`. \* specific_item_price - The discount is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id`. + deprecated: false + enum: + - invoice_amount + - specific_item_price + duration_type: + type: array + items: + type: string + description: | + Specifies the time duration for which this discount is attached to the subscription. \* forever - The discount is attached to the subscription and applied on the invoices till it is [explicitly removed](/docs/api/subscriptions?prod_cat_ver=2#update_subscription_for_items_discounts_operation_type). \* limited_period - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period` and `period_unit`. \* one_time - The discount stays attached to the subscription till it is applied on an invoice **once**. It is removed after that from the subscription. + deprecated: false + default: forever + enum: + - one_time + - forever + - limited_period + percentage: + type: array + description: | + The percentage of the original amount that should be deducted from it. Only applicable when `discount.type` is percentage. + items: + maximum: 100 + minimum: 0.01 + type: number + format: double + deprecated: false + amount: + type: array + description: | + The value of the discount. [The format of this value](https://apidocs.chargebee.com/docs/api?prod_cat_ver=2#currencies) depends on the kind of currency. This is only applicable when `discount.type` is `fixed_amount`. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + period: + type: array + description: | + The duration of time for which the discount is attached to the subscription, in `period_units`. Applicable only when `duration_type` is `limited_period`. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + period_unit: + type: array + items: + type: string + description: | + The unit of time for `period`. Applicable only when `duration_type` is `limited_period`. \* day - A period of 24 hours. \* week - A period of 7 days. \* month - A period of 1 calendar month. \* year - A period of 1 calendar year. + deprecated: false + enum: + - day + - week + - month + - year + included_in_mrr: + type: array + description: | + The discount is included in MRR calculations for your site. This attribute is only applicable when `duration_type` is `one_time` and when the [feature is enabled](https://www.chargebee.com/docs/reporting.html#dashboards_flexible-mrr-calculation) in Chargebee. Also, If the [site-level setting](https://www.chargebee.com/docs/reporting.html#chart_flexible-mrr-calculation) is to exclude one-time discounts from MRR calculations, this value is always returned `false`. + items: + type: boolean + deprecated: false + item_price_id: + type: array + description: | + The [id of the item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) in the subscription to which the discount is to be applied. Relevant only when `apply_on` = `specific_item_price`. + items: + maxLength: 100 + type: string + deprecated: false + description: | + Parameters for discounts + deprecated: false + item_tiers: + type: object + properties: + item_price_id: + type: array + description: | + The id of the item price for which the tier price is being overridden. + items: + maxLength: 100 + type: string + deprecated: false + starting_unit: + type: array + description: | + The lowest value in the quantity tier. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + ending_unit: + type: array + description: | + The highest value in the quantity tier. + items: + type: integer + format: int32 + deprecated: false + price: + type: array + description: | + The overridden price of the tier. The value depends on the [type of currency](./#handling_currency_units). + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + default: 0 + starting_unit_in_decimal: + type: array + description: | + The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal` of the next lower tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + ending_unit_in_decimal: + type: array + description: | + The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal` of the next higher tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + price_in_decimal: + type: array + description: | + The decimal representation of the per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. When the `pricing_model` is `stairstep`, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: | + Parameters for item_tiers + deprecated: false + tax_providers_fields: + type: object + properties: + provider_name: + type: array + items: + maxLength: 50 + type: string + deprecated: false + field_id: + type: array + items: + maxLength: 50 + type: string + deprecated: false + field_value: + type: array + items: + maxLength: 50 + type: string + deprecated: false + description: | + Parameters for tax_providers_fields + deprecated: false + encoding: + billing_address: + style: deepObject + explode: true + contract_term: + style: deepObject + explode: true + customer: + style: deepObject + explode: true + discounts: + style: deepObject + explode: true + item_tiers: + style: deepObject + explode: true + shipping_address: + style: deepObject + explode: true + subscription: + style: deepObject + explode: true + subscription_items: + style: deepObject + explode: true + tax_providers_fields: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - estimate + type: object + properties: + estimate: + $ref: '#/components/schemas/Estimate' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/cancel_subscription_for_items_estimate: + post: + summary: Cancel subscription for items estimate + description: | + This creates an estimate for canceling a subscription without actually canceling it. Estimate details include canceling date, unbilled charge options, refund credit handling, the amount to be credited after cancellation, and so on. + operationId: cancel_subscription_for_items_estimate + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})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25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + end_of_term: + type: boolean + description: | + Set this to `true` if you want to cancel the subscription at the end of the current subscription billing cycle. The subscription `status` changes to `non_renewing`. + deprecated: false + default: false + cancel_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + Specify the date/time at which you want to cancel the subscription. This parameter should not be provided when `end_of_term` is passed as `true`. `cancel_at` can be set to a value in the past. This is called backdating. Use backdating when the subscription has been canceled already but its billing has been delayed. The following prerequisites must be met to allow backdating: + + * Backdating must be enabled for subscription cancellation. + * The current day of the month does not exceed the limit set in Chargebee for backdating subscription cancellation. This limit is typically the day of the month by which the accounting for the previous month must be closed. + * The date is on or after `current_term_start`. + * The date is on or after the last date/time any of the following changes were made: + * Changes in the recurring items or their prices. + * Addition of non-recurring items. + * The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the subscription's plan is 2 months and today is 14th April, `changes_scheduled_at` cannot be earlier than 14th February. + . + format: unix-time + deprecated: false + credit_option_for_current_term_charges: + type: string + description: | + For immediate cancellation (`end_of_term` = `false`), specify how to provide credits for current term charges. When not provided, the [site default](https://www.chargebee.com/docs/cancellations.html#configure-subscription-cancellation) is considered. \* none - No credits notes are created. \* full - Credits are issues for the full value of the current term charges. \* prorate - Prorated credits are issued. + deprecated: false + enum: + - none + - prorate + - full + unbilled_charges_option: + type: string + description: | + For immediate cancellation (`end_of_term` = `false`), specify how to handle any unbilled charges. When not provided, the [site default](https://www.chargebee.com/docs/cancellations.html#configure-subscription-cancellation) is considered. \* invoice - An invoice is generated immediately with the unbilled charges. \* delete - The unbilled charges are deleted. + deprecated: false + enum: + - invoice + - delete + account_receivables_handling: + type: string + description: | + Applicable when the subscription has past due invoices. Specify this if you want to close the due invoices of the subscription. If specified as schedule_payment_collection/write_off, the due invoices of the subscription will be qualified for the selected operation after the remaining refundable credits and excess payments are applied. **Note:** The payment collection attempt will be asynchronous. Not applicable when 'end_of_term' is true. \* no_action - No action is taken. \* write_off - The amount due in the invoices will be written-off. Credit notes created due to write-off will not be sent in the response. \* schedule_payment_collection - An automatic charge for the due amount of the past invoices will be attempted on the payment method available, if customer's auto-collection property is 'ON'. + deprecated: false + enum: + - no_action + - schedule_payment_collection + - write_off + refundable_credits_handling: + type: string + description: | + Applicable when the customer has remaining refundable credits(issued against online payments). If specified as schedule_refund, the refund will be initiated for these credits after they are applied against the subscription's past due invoices if any. **Note:** The refunds initiated will be asynchronous. Not applicable when 'end_of_term' is true. \* schedule_refund - Initiates refund of the remaining credits. \* no_action - No action is taken. + deprecated: false + enum: + - no_action + - schedule_refund + contract_term_cancel_option: + type: string + description: | + Cancels the current contract term. + + * `terminate_immediately` immediately does the following: + * sets the contract term [`status`](contract_terms#contract_term_status) to `terminated`. + * Cancels the subscription. + * Collects any [termination fee](contract_terms#termintation_fee). + * `end_of_contract_term` Sets the [`contract_term[action_at_term_end]`](contract_terms#contract_term_action_at_term_end) to `cancel`. In other words, the contract term is not renewed and the subscription is canceled at the end of the contract term. + . \* terminate_immediately - Terminate immediately \* end_of_contract_term - End of contract term + deprecated: false + enum: + - terminate_immediately + - end_of_contract_term + invoice_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The document date displayed on the invoice PDF. The default value is the current date. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. Moreover, if `create_pending_invoices` is `true`, and if the site is configured to set invoice dates to date of closing, then upon invoice closure, this date is changed to the invoice closing date. `taxes` and `line_item_taxes` are computed based on the `tax` configuration as of `invoice_date`. When passing this parameter, the following prerequisites must be met: + + * `invoice_date` must be in the past. + * `invoice_date` is not more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December. + * It is not earlier than `cancel_at`. + . + format: unix-time + deprecated: false + cancel_reason_code: + maxLength: 100 + type: string + description: | + Reason code for canceling the subscription. Must be one from a list of reason codes set in the Chargebee app in **Settings \> Configure Chargebee \> Reason Codes \> Subscriptions \> Subscription Cancellation**. Must be passed if set as mandatory in the app. The codes are case-sensitive. + deprecated: false + subscription_items: + type: object + properties: + item_price_id: + type: array + description: | + The unique `id` of the charge item_price that represents the termination fee. + items: + maxLength: 100 + type: string + deprecated: false + quantity: + type: array + description: | + The quantity associated with the termination fee. Applicable only when the item_price for the termination charge is quantity-based. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + unit_price: + type: array + description: | + The termination fee. In case it is quantity-based, this is the fee per unit. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + unit_price_in_decimal: + type: array + description: | + When [price overriding](https://www.chargebee.com/docs/2.0/price-override.html) is enabled for the site, the price or per-unit price of the item can be set here. The [value set for the item price](https://apidocs.chargebee.com/docs/api/item_prices#item_price_price) is used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + service_period_days: + type: array + description: | + The service period of the termination fee---expressed in days---starting from the current date. + items: + maximum: 730 + minimum: 1 + type: integer + format: int32 + deprecated: false + description: | + Parameters for subscription_items + deprecated: false + encoding: + subscription_items: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - estimate + type: object + properties: + estimate: + $ref: '#/components/schemas/Estimate' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/resume_subscription_estimate: + post: + summary: Resume subscription estimate + description: "Generates an estimate for the 'resume subscription' operation.\ + \ This is similar to the [Resume a subscription](/docs/api/subscriptions#resume_a_subscription)\ + \ API, but the subscription will not be resumed. Only an estimate for this\ + \ operation is created.\n\nIn the response,\n\n* **estimate.subscription_estimate**\ + \ has the subscription details.\n* **estimate.invoice_estimate** has details\ + \ of the invoice that will be generated immediately. This will not be present\ + \ if no immediate invoice is generated for this operation. This will happen\ + \ for in-term resumption^++^. \n\n **^++^What is an \"in-term resumption\"\ + ?** \n An \"in-term resumption\" is when the resumption happens within\ + \ the billing term of the subscription.\n* **estimate.next_invoice_estimate**\ + \ has details of the invoice that will be generated during the next billing\ + \ date of this subscription. This will be present only if no immediate invoice\ + \ is generated during this operation (scenario mentioned above) and this subscription\ + \ has next billing. \n\n The generated invoice_estimate/next_invoice_estimate\ + \ will include all the balances - [Promotional Credits](https://www.chargebee.com/docs/promotional-credits.html),\ + \ Refundable Credits, and Excess Payments - if any.\n" + operationId: resume_subscription_estimate + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + resume_option: + type: string + description: | + List of options to resume the subscription. \* immediately - Resume immediately \* specific_date - Resume on a specific date + deprecated: false + enum: + - immediately + - specific_date + charges_handling: + type: string + description: | + Applicable when charges get added during this operation and **resume_option** is set as 'immediately'. Allows to raise invoice immediately or add them to unbilled charges. \* add_to_unbilled_charges - Add to unbilled charges \* invoice_immediately - Invoice immediately + deprecated: false + enum: + - invoice_immediately + - add_to_unbilled_charges + subscription: + type: object + properties: + resume_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + For a paused subscription, it is the date/time when the subscription is scheduled to resume. If the pause is for an indefinite period, this value is not returned. + format: unix-time + deprecated: false + description: | + Parameters for subscription + deprecated: false + encoding: + subscription: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - estimate + type: object + properties: + estimate: + $ref: '#/components/schemas/Estimate' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /estimates/create_invoice_for_items: + post: + summary: Create invoice for items estimate + description: | + This endpoint creates an invoice estimate for non-recurring items. + operationId: create_invoice_for_items_estimate + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?: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:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + currency_code: + maxLength: 3 + type: string + description: | + The currency code (ISO 4217 format) of the invoice amount. + deprecated: false + invoice_note: + maxLength: 2000 + type: string + description: | + A note for this particular invoice. This, and [all other notes](/docs/api/invoices#invoice_notes) for the invoice are displayed on the PDF invoice sent to the customer. + deprecated: false + remove_general_note: + type: boolean + description: | + Set as `true` to remove the **[general note](https://www.chargebee.com/docs/invoice_notes.html#adding-general-notes)** from this invoice. + deprecated: false + default: false + coupon_ids: + type: array + description: | + List of Coupons to be added. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + authorization_transaction_id: + maxLength: 40 + type: string + description: | + Authorization transaction to be captured. + deprecated: false + payment_source_id: + maxLength: 40 + type: string + description: | + Payment source to be used for this payment. + deprecated: false + auto_collection: + type: string + description: | + The customer level auto collection will be override if specified. \* on - Whenever an invoice is created, an automatic attempt will be made to charge. \* off - Whenever an invoice is created as payment due. + deprecated: false + enum: + - "on" + - "off" + invoice_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The document date displayed on the invoice PDF. By default, it is the date of creation of the invoice or, when Metered Billing is enabled, it can be the date of closing the invoice. Provide this value to backdate the invoice (set the invoice date to a value in the past). Backdating an invoice is done for reasons such as booking revenue for a previous date or when the non-recurring charge is effective as of a past date. `taxes` and `line_item_taxes` are computed based on the tax configuration as of this date. The date should not be more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December. + format: unix-time + deprecated: false + invoice: + type: object + properties: + customer_id: + maxLength: 50 + type: string + description: | + Identifier of the customer for which this invoice needs to be created. + deprecated: false + subscription_id: + maxLength: 50 + type: string + description: | + Identifier of the subscription for which this invoice needs to be created. Should be specified if 'customer_id' is not specified.(not applicable for consolidated invoice) + deprecated: false + po_number: + maxLength: 100 + type: string + description: | + Purchase Order Number for this invoice. + deprecated: false + description: | + Parameters for invoice + deprecated: false + shipping_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for shipping_address + deprecated: false + item_prices: + type: object + properties: + item_price_id: + type: array + description: | + A unique ID for your system to identify the item price. + items: + maxLength: 100 + type: string + deprecated: false + quantity: + type: array + description: | + Item price quantity + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + unit_price: + type: array + description: | + The price or per-unit-price of the item price. By default, it is the [value set](/docs/api/item_prices#item_price_price) for the `item_price`. This is only applicable when the `pricing_model` of the `item_price` is `flat_fee` or `per_unit`. The value depends on the [type of currency](/docs/api/#handling_currency_units). + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + unit_price_in_decimal: + type: array + description: | + The decimal representation of the price or per-unit price of the plan. The value is in major units of the currency. Always returned when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + date_from: + type: array + description: | + The time when the service period for the item starts. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + date_to: + type: array + description: | + The time when the service period for the item ends. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + description: | + Parameters for item_prices + deprecated: false + item_tiers: + type: object + properties: + item_price_id: + type: array + description: | + The id of the item price to which this tier belongs. + items: + maxLength: 100 + type: string + deprecated: false + starting_unit: + type: array + description: | + The lowest value in the quantity tier. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + ending_unit: + type: array + description: | + The highest value in the quantity tier. + items: + type: integer + format: int32 + deprecated: false + price: + type: array + description: | + The per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. The total cost for the item price when the `pricing_model` is `stairstep`. The value is in the minor unit of the currency. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + default: 0 + starting_unit_in_decimal: + type: array + description: | + The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal` of the next lower tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + ending_unit_in_decimal: + type: array + description: | + The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal` of the next higher tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + price_in_decimal: + type: array + description: | + The decimal representation of the per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. When the `pricing_model` is `stairstep`, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: | + Parameters for item_tiers + deprecated: false + charges: + type: object + properties: + amount: + type: array + description: | + The amount to be charged. The unit depends on the [type of currency](/docs/api?prod_cat_ver=1#md_disabled). + items: + minimum: 1 + type: integer + format: int64 + deprecated: false + amount_in_decimal: + type: array + description: | + The decimal representation of the amount for the [one-time charge](https://www.chargebee.com/docs/charges.html#one-time-charges ). Provide the value in major units of the currency. Can be provided only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units ) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: + type: array + description: | + Description for this charge + items: + maxLength: 250 + type: string + deprecated: false + taxable: + type: array + description: | + The amount to be charged is taxable or not. + items: + type: boolean + deprecated: false + default: true + tax_profile_id: + type: array + description: | + Tax profile of the charge. + items: + maxLength: 50 + type: string + deprecated: false + avalara_tax_code: + type: array + description: | + The Avalara tax codes to which items are mapped to should be provided here. Applicable only if you use Chargebee's [AvaTax for Sales integration](https://www.chargebee.com/docs/avalara.html). + items: + maxLength: 50 + type: string + deprecated: false + hsn_code: + type: array + description: | + The [HSN code](https://cbic-gst.gov.in/gst-goods-services-rates.html) to which the item is mapped for calculating the customer's tax in India. Applicable only when both of the following conditions are true: + + * **[India](https://www.chargebee.com/docs/indian-gst.html#configuring-indian-gst)** has been enabled as a **Tax Region**. (An error is returned when this condition is not true.) + * The [**AvaTax for Sales** integration](\"https://www.chargebee.com/docs/avalara.html\") has been enabled in Chargebee. + items: + maxLength: 50 + type: string + deprecated: false + taxjar_product_code: + type: array + description: | + The TaxJar product codes to which items are mapped to should be provided here. Applicable only if you use Chargebee's [TaxJar integration](https://www.chargebee.com/docs/taxjar.html). + items: + maxLength: 50 + type: string + deprecated: false + avalara_sale_type: + type: array + items: + type: string + description: | + Indicates the type of sale carried out. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. \* consumed - Transaction is for an item that is consumed directly \* vendor_use - Transaction is for an item that is subject to vendor use tax \* wholesale - Transaction is a sale to another company that will resell your product or service to another consumer \* retail - Transaction is a sale to an end user + deprecated: false + enum: + - wholesale + - retail + - consumed + - vendor_use + avalara_transaction_type: + type: array + description: | + Indicates the type of product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. + items: + type: integer + format: int32 + deprecated: false + avalara_service_type: + type: array + description: | + Indicates the type of service for the product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. + items: + type: integer + format: int32 + deprecated: false + date_from: + type: array + description: | + The time when the service period for the charge starts. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + date_to: + type: array + description: | + The time when the service period for the charge ends. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + description: | + Parameters for charges + deprecated: false + notes_to_remove: + type: object + properties: + entity_type: + type: array + items: + type: string + description: | + Type of entity to which the [note](./invoices#invoice_notes) belongs. To remove the general note, use the `remove_general_note` parameter. \* plan - Entity that represents a plan. \* addon - Entity that represents an addon. \* addon_item_price - Indicates that this line item is based on addon Item Price \* plan_item_price - Indicates that this line item is based on plan Item Price \* customer - Entity that represents a customer. \* subscription - Entity that represents a subscription of customer. \* charge_item_price - Indicates that this line item is based on charge Item Price \* coupon - Entity that represents a coupon. + deprecated: false + enum: + - customer + - subscription + - coupon + - plan_item_price + - addon_item_price + - charge_item_price + entity_id: + type: array + description: | + Unique identifier of the [note](https://apidocs.chargebee.com/docs/api/invoices#invoice_notes). + items: + maxLength: 100 + type: string + deprecated: false + description: | + Parameters for notes_to_remove + deprecated: false + discounts: + required: + - apply_on + type: object + properties: + percentage: + type: array + description: | + The percentage of the original amount that should be deducted from it. Only applicable when `discount.type` is percentage. + items: + maximum: 100 + minimum: 0.01 + type: number + format: double + deprecated: false + amount: + type: array + description: | + The value of the discount. [The format of this value](https://apidocs.chargebee.com/docs/api?prod_cat_ver=2#currencies) depends on the kind of currency. This is only applicable when `discount.type` is `fixed_amount`. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + apply_on: + type: array + items: + type: string + description: | + The amount on the invoice to which the discount is applied. \* invoice_amount - The discount is applied to the invoice `sub_total`. \* specific_item_price - The discount is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id`. + deprecated: false + enum: + - invoice_amount + - specific_item_price + item_price_id: + type: array + description: | + The [id of the item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) in the subscription to which the discount is to be applied. Relevant only when `apply_on` = `specific_item_price`. + items: + maxLength: 100 + type: string + deprecated: false + description: | + Parameters for discounts + deprecated: false + tax_providers_fields: + type: object + properties: + provider_name: + type: array + items: + maxLength: 50 + type: string + deprecated: false + field_id: + type: array + items: + maxLength: 50 + type: string + deprecated: false + field_value: + type: array + items: + maxLength: 50 + type: string + deprecated: false + description: | + Parameters for tax_providers_fields + deprecated: false + encoding: + charges: + style: deepObject + explode: true + discounts: + style: deepObject + explode: true + invoice: + style: deepObject + explode: true + item_prices: + style: deepObject + explode: true + item_tiers: + style: deepObject + explode: true + notes_to_remove: + style: deepObject + explode: true + shipping_address: + style: deepObject + explode: true + tax_providers_fields: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - estimate + type: object + properties: + estimate: + $ref: '#/components/schemas/Estimate' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /estimates/gift_subscription_for_items: + post: + summary: Gift subscription estimate for items + description: | + This endpoint generates an estimate for a subscription that is intended to be a gift. The estimate provides details about the gift sender, gift recipient, address details of the recipient, and the type and details of subscription items included in the gift. + operationId: gift_subscription_estimate_for_items + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[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]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + coupon_ids: + type: array + description: | + List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + gift: + type: object + properties: + scheduled_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + Indicates the date on which the gift notification is sent to the receiver. If not passed, the receiver is notified immediately. + format: unix-time + deprecated: false + auto_claim: + type: boolean + description: | + When `true`, the claim happens automatically. When not passed, the default value in the site settings is used. + deprecated: false + default: false + no_expiry: + type: boolean + description: | + When `true`, indicates that the gift does not expire. Do not pass or pass as `false` when `auto_claim` is set. + deprecated: false + claim_expiry_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The date until which the gift can be claimed. Must be set to a value after `scheduled_at`. If the gift is not claimed within `claim_expiry_date`, it will expire and the subscription will move to `cancelled` state. When not passed, the value specified in the site settings will be used. Pass as `NULL` or do not pass when `auto_claim` or `no_expiry` are set. + format: unix-time + deprecated: false + description: | + Parameters for gift + deprecated: false + gifter: + required: + - customer_id + - signature + type: object + properties: + customer_id: + maxLength: 50 + type: string + description: | + Gifter customer id. + deprecated: false + signature: + maxLength: 50 + type: string + description: | + Gifter sign-off name + deprecated: false + note: + maxLength: 500 + type: string + description: | + Personalized message for the gift. + deprecated: false + payment_src_id: + maxLength: 40 + type: string + description: | + Identifier of the payment source + deprecated: false + description: | + Parameters for gifter + deprecated: false + gift_receiver: + required: + - customer_id + - email + - first_name + - last_name + type: object + properties: + customer_id: + maxLength: 50 + type: string + description: | + Receiver customer id. + deprecated: false + first_name: + maxLength: 150 + type: string + description: | + First name of the receiver as given by the gifter. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + Last name of the receiver as given by the gifter, + deprecated: false + email: + maxLength: 70 + type: string + description: | + Email of the receiver. All gift related emails are sent to this email. + format: email + deprecated: false + description: | + Parameters for gift_receiver + deprecated: false + payment_intent: + type: object + properties: + id: + maxLength: 150 + type: string + description: | + Identifier for PaymentIntent generated by Chargebee.js. Applicable only when you are using Chargebee.js for completing the 3DS flow. The PaymentIntent should be in 'authorized' state while passing it here. You need not pass other PaymentIntent parameters if this is passed. + deprecated: false + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account used for performing the 3DS flow. + deprecated: false + gw_token: + maxLength: 65000 + type: string + description: | + Identifier for 3DS transaction/verification object at the gateway. Can be passed only after successfully completing the 3DS flow. Refer [3DS implementation in Chargebee](/docs/api/3ds_card_payments#3ds-gateway-side-implementation) to find out the gateway-specific gw_token format. Applicable when you are using gateway APIs directly for completing the 3DS flow. + deprecated: false + payment_method_type: + type: string + description: | + The list of payment method types (For example, card, ideal, sofort, bancontact, etc.) this Payment Intent is allowed to use. If payment method type is empty, Card is taken as the default type for all gateways except Razorpay. \* card - card \* netbanking_emandates - netbanking_emandates \* dotpay - dotpay \* faster_payments - Faster Payments \* upi - upi \* direct_debit - direct_debit \* sepa_instant_transfer - Sepa Instant Transfer \* bancontact - bancontact \* google_pay - google_pay \* apple_pay - apple_pay \* giropay - giropay \* paypal_express_checkout - paypal_express_checkout \* venmo - Venmo \* klarna_pay_now - Klarna Pay Now \* sofort - sofort \* amazon_payments - Amazon Payments \* ideal - ideal \* pay_to - PayTo \* boleto - boleto + deprecated: false + enum: + - card + - ideal + - sofort + - bancontact + - google_pay + - dotpay + - giropay + - apple_pay + - upi + - netbanking_emandates + - paypal_express_checkout + - direct_debit + - boleto + - venmo + - amazon_payments + - pay_to + - faster_payments + - sepa_instant_transfer + - klarna_pay_now + reference_id: + maxLength: 65000 + type: string + description: | + Identifier for Braintree permanent token. Applicable when you are using Braintree APIs for completing the 3DS flow. + deprecated: false + additional_information: + type: object + additionalProperties: true + description: | + \* \`checkout_com\`: While adding a new payment method using \[permanent token\](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, \`document\` ID and \`country_of_residence\` are required to support payments through \[dLocal\](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal). \* \`payer\`: User related information. \* \`country_of_residence\`: This is required since the billing country associated with the user's payment method may not be the same as their country of residence. Hence the user's country of residence needs to be specified. The country code should be a \[two-character ISO code\](https://docs.checkout.com/resources/codes/country-codes). \* \`document\`: Document ID is the user's \[identification number\](https://docs.dlocal.com/api-documentation/payins-api-reference/country-reference#documents) based on their country. \* \`bluesnap\`: While passing raw card details to BlueSnap, if \`fraud_session_id\` is added, \[additional validation\](https://developers.bluesnap.com/docs/fraud-prevention) is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your \[BlueSnap fraud session ID\](https://developers.bluesnap.com/docs/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation. \* \`braintree\`: While passing raw card details to Braintree, your \`fraud_merchant_id\` and the user's \`device_session_id\` can be added to perform \[additional validation\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`fraud_merchant_id\`: Your \[merchant ID\](https://developers.braintreepayments.com/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection. \* \`chargebee_payments\`: While passing raw card details to Chargebee Payments, if \`fraud_session_id\` is added, additional validation is performed to avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`fraud_session_id\`: Your Chargebee Payments fraud session ID required to perform anti-fraud validation. \* \`bank_of_america\`: While passing raw card details to Bank of America, your user's \`device_session_id\` can be added to perform additional validation and avoid fraudulent transactions. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device. \* \`ecentric\`: This parameter is used to verify and process payment method details in Ecentric. If the \`merchant_id\` parameter is included, Chargebee will vault it / perform a lookup and verification against this \`merchant_id\`, overriding the one configured in Chargebee. If tokens and processing occur in the same Merchant GUID, you can just skip this part. \* \`merchant_id\`: Merchant GUID where the card is vaulted or need to be vaulted. \* \`ebanx\`: While passing raw card details to EBANX, the user's \`document\` is required for some countries and \`device_session_id\` can be added to perform \[additional validation\](https://developer.ebanx.com/docs/payments/guides/features/device-fingerprint#device-fingerprint) and avoid fraudulent transactions. \* \`payer\`: User related information. \* \`document\`: Document is the user's identification number based on their country. \* \`fraud\`: Fraud identification related information. \* \`device_session_id\`: Session ID associated with the user's device + deprecated: false + description: | + Parameters for payment_intent + deprecated: false + shipping_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for shipping_address + deprecated: false + subscription_items: + type: object + properties: + item_price_id: + type: array + description: | + The unique identifier of the item price. + items: + maxLength: 100 + type: string + deprecated: false + quantity: + type: array + description: | + The quantity of the item purchased + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + default: 1 + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + description: | + Parameters for subscription_items + deprecated: false + encoding: + gift: + style: deepObject + explode: true + gift_receiver: + style: deepObject + explode: true + gifter: + style: deepObject + explode: true + payment_intent: + style: deepObject + explode: true + shipping_address: + style: deepObject + explode: true + subscription_items: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - estimate + type: object + properties: + estimate: + $ref: '#/components/schemas/Estimate' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /estimates/update_subscription_for_items: + post: + summary: Estimate for updating a subscription + description: | + Returns an estimate for updating a subscription. + + In the response, + + * [subscription_estimate](/docs/api/estimates#subscription_estimate_attributes): The details of the changed subscription such as `status`, next billing date, and so on. + * [invoice_estimate](/docs/api/estimates#invoice_estimate_attributes):The details of the immediate invoice, if it is generated. An immediate invoice is not generated when: + * `end_of_term` parameter is true + * `prorate` parameter is `false` + * No changes are made to the plan item prices or addon item prices in `subscription_items`. + * For changes such as [quantity downgrades](https://www.chargebee.com/docs/proration.html#proration-mechanism_plan-quantity-downgrade-paid-invoice). + * [next_invoice_estimate](/docs/api/estimates#next_invoice_estimate_attributes):The details of the invoice to be generated later (if any) on the occasion that no immediate invoice has been generated. + * [credit_note_estimates](/docs/api/estimates#credit_note_estimate_attributes):The list of credit notes (if any) generated during this operation. + * [unbilled_charge_estimates](/docs/api/estimates#unbilled_charge_estimate_attributes): The details of charges that have not been invoiced. This is returned only if the `invoice_immediately` parameter is set to `false`. + operationId: estimate_for_updating_a_subscription + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?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))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + changes_scheduled_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + **Caution** + + This parameter is unavailable when the [Subscription Ramps](https://chargebee.com/docs/2.0/ramps.html) feature is enabled; use [Create a ramp API](ramps?prod_cat_ver=2#create_a_ramp) instead. + When `change_option` is set to `specific_date`, then set the date/time at which the subscription change is to happen or has happened. **Note:** It is recommended not to pass this parameter along with `reactivate_from`. `changes_scheduled_at` can be set to a value in the past. This is called backdating the subscription change and is performed when the subscription change has already been provisioned but its billing has been delayed. Backdating is allowed only when the following prerequisites are met: + + * Backdating must be enabled for subscription change operations. + * Only the following changes can be backdated: + * Changes in the recurring items or their prices. + * Addition of non-recurring items. + * Subscription `status` is `active`, `cancelled`, or `non_renewing`. + * The current day of the month does not exceed the limit set in Chargebee for backdating subscription change. This limit is typically the day of the month by which the accounting for the previous month must be closed. + * The date is on or after `current_term_start`. + * The date is on or after the last date/time any of the following changes were made: + * Changes in the recurring items or their prices. + * Addition of non-recurring items. + * The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `changes_scheduled_at` cannot be earlier than 14th February. + . + format: unix-time + deprecated: false + change_option: + type: string + description: "Specifies the effective date for the subscription\ + \ change. \\* end_of_term - The change is carried out at the end\ + \ of the current billing cycle of the subscription. \\* specific_date\ + \ - Executes the change on a specified date. The change occurs\ + \ as of the date/time defined in `changes_scheduled_at`. \n**Caution**\n\ + \nThe `end_of_term` and `specific_date` options are unavailable\ + \ when the [Subscription Ramps](https://chargebee.com/docs/2.0/ramps.html)\ + \ feature is enabled; use [Create a ramp API](ramps?prod_cat_ver=2#create_a_ramp)\ + \ instead.\n\\* immediately - The change is carried out immediately.\n" + deprecated: false + enum: + - immediately + - end_of_term + - specific_date + mandatory_items_to_remove: + type: array + description: | + Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver=2) that are to be removed from the subscription. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + replace_items_list: + type: boolean + description: | + If `true` then the existing `subscription_items` list for the subscription is replaced by the one provided. If `false` then the provided `subscription_items` list gets added to the existing list. + deprecated: false + default: false + invoice_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The document date displayed on the invoice PDF. The default value is the current date. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. Moreover, if `create_pending_invoices` is set to `true`, and if the site is configured to set invoice dates to date of closing, then upon invoice closure, this date is changed to the invoice closing date. taxes and line_item_taxes are computed based on the tax configuration as of `invoice_date`. When passing this parameter, the following prerequisites must be met: + + * `invoice_date` must be in the past. + * `invoice_date` is not more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December. + * It is not earlier than `changes_scheduled_at`, `reactivate_from`, or `trial_end`. + * `invoice_immediately` is `true`. + . + format: unix-time + deprecated: false + billing_cycles: + minimum: 0 + type: integer + description: | + Billing cycles set for plan-item price is used by default. + format: int32 + deprecated: false + terms_to_charge: + minimum: 1 + type: integer + description: | + The number of subscription billing cycles to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html). If a new term is started for the subscription due to this API call, then `terms_to_charge` is inclusive of this new term. See description for the `force_term_reset` parameter to learn more about when a subscription term is reset. + format: int32 + deprecated: false + reactivate_from: + pattern: "^[0-9]{10}$" + type: integer + description: "If the subscription `status` is `cancelled` and it\ + \ is being reactivated via this operation, this is the date/time\ + \ at which the subscription should be reactivated. \n**Note:**\ + \ It is recommended not to pass this parameter along with `changed_scheduled_at`.\ + \ `reactivate_from` can be backdated (set to a value in the past).\ + \ Use backdating when the subscription has been reactivated already\ + \ but its billing has been delayed. Backdating is allowed only\ + \ when the following prerequisites are met:\n\n* Backdating must\ + \ be enabled for subscription reactivation operations.\n* The\ + \ current day of the month does not exceed the limit set in Chargebee\ + \ for backdating subscription change. This limit is the day of\ + \ the month by which the accounting for the previous month must\ + \ be closed.\n* The date is on or after the last date/time any\ + \ of the product catalog items of the subscription were changed.\n\ + * The date is not more than duration X into the past where X is\ + \ the billing period of the plan. For example, if the period of\ + \ the plan in the subscription is 2 months and today is 14th April,\ + \ `changes_scheduled_at` cannot be earlier than 14th February.\n\ + .\n" + format: unix-time + deprecated: false + billing_alignment_mode: + type: string + description: | + Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date) chosen for the site for calendar billing. Only applicable when using calendar billing. \* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly.. \* delayed - Subscription period will be aligned with the configured billing date at the next renewal. + deprecated: false + enum: + - immediate + - delayed + coupon_ids: + type: array + description: | + List of coupons to be applied to this subscription. You can provide coupon ids or [coupon codes](https://apidocs.chargebee.com/docs/api/coupon_codes). + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + replace_coupon_list: + type: boolean + description: | + If `true` then the existing `coupon_ids` list for the subscription is replaced by the one provided. If `false` then the provided list gets added to the existing `coupon_ids`. + deprecated: false + default: false + prorate: + type: boolean + description: | + * When `true`: [Prorated credits or charges](https://www.chargebee.com/docs/2.0/proration.html#proration-mechanism) are created as applicable for this change. + * When `false`: The subscription is changed without creating any credits or charges. + * When not provided, the value configured in the [site settings](https://www.chargebee.com/docs/2.0/proration.html#proration-for-subscription-change) is considered. + + **Caveat** + + For further changes within the same billing term, when `prorate` is set to `true`, **credits** are **not created** when **all** the conditions below hold true: + + An immediate previous change was made + + * with `prorate` set to `false` and + * no changes were made to the subscription's billing term and + * a change was made to either the subscription's items or their prices. + deprecated: false + end_of_term: + type: boolean + description: | + Set this to true if you want the update to be applied at the end of the current subscription billing cycle. + deprecated: false + default: false + force_term_reset: + type: boolean + description: "Say the subscription has the renewal date as 28th\ + \ of every month. When the plan-item price of the subscription\ + \ is set to one that has the same billing period as the current\ + \ plan-item price, the subscription change does not change the\ + \ term. In other words, the subscription still renews on the 28th.\ + \ Passing this parameter as `true` will have the subscription\ + \ reset its term to the current date (provided `end_of_term` is\ + \ false). \n**Note**: When the new plan-item price has a billing\ + \ period different from the current plan-item price of the subscription,\ + \ the term is always reset, regardless of the value passed for\ + \ this parameter.\n" + deprecated: false + default: false + reactivate: + type: boolean + description: | + Applicable only for `cancelled` subscriptions. When passed as `true`, the canceled subscription is activated; otherwise subscription changes are made without changing its `status`. If not passed, subscription will be activated only if `subscription_items` is passed. + deprecated: false + include_delayed_charges: + type: boolean + description: | + If true, all the unbilled charges will be included for the invoice estimate. + deprecated: false + default: false + use_existing_balances: + type: boolean + description: | + The generated invoice_estimate/next_invoice_estimate will include all the balances - Promotional Credits, Refundable Credits, and Excess Payments - if any. If you don't want these balances to be included you can specify 'false' for the parameter *use_existing_balances*. + deprecated: false + default: true + invoice_immediately: + type: boolean + description: "If there are charges raised immediately for the subscription,\ + \ this parameter specifies whether those charges are to be invoiced\ + \ immediately or added to [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html).\ + \ The default value is as per the [site settings](https://www.chargebee.com/docs/unbilled-charges.html#configuration).\ + \ \n**Note:** `invoice_immediately` only affects charges that\ + \ are raised at the time of execution of this API call. Any charges\ + \ scheduled to be raised in the future are not affected by this\ + \ parameter. .\n" + deprecated: false + subscription: + required: + - id + type: object + properties: + id: + maxLength: 50 + type: string + description: | + A unique and immutable identifier for the subscription. If not provided, it is autogenerated. + deprecated: false + start_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The new start date of a `future` subscription. Applicable only for `future` subscriptions. + format: unix-time + deprecated: false + trial_end: + pattern: "^[0-9]{10}$" + type: integer + description: | + The time at which the trial has ended or will end for the subscription. This is only allowed when the subscription `status` is `future`, `in_trial`, or `cancelled`. Also, the value must not be earlier than `changes_scheduled_at` or `start_date`. **Note** : This parameter can be backdated (set to a value in the past) only when the subscription is in `cancelled` or `in_trial` `status`. Do this to keep a record of when the trial ended in case it ended at some point in the past. When `trial_end` is backdated, the subscription immediately goes into `active` or `non_renewing` status. + format: unix-time + deprecated: false + auto_collection: + type: string + description: | + Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property. \* off - Automatic collection of charges will not be made for this subscription. Use this for offline payments. \* on - Whenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available. + deprecated: false + enum: + - "on" + - "off" + offline_payment_method: + type: string + description: | + The preferred offline payment method for the subscription. \* uk_automated_bank_transfer - UK Automated Bank Transfer \* jp_automated_bank_transfer - JP Automated Bank Transfer \* bank_transfer - Bank Transfer \* us_automated_bank_transfer - US Automated Bank Transfer \* boleto - Boleto \* no_preference - No Preference \* sepa_credit - SEPA Credit \* mx_automated_bank_transfer - MX Automated Bank Transfer \* ach_credit - ACH Credit \* custom - Custom \* eu_automated_bank_transfer - EU Automated Bank Transfer \* cash - Cash \* check - Check + deprecated: false + enum: + - no_preference + - cash + - check + - bank_transfer + - ach_credit + - sepa_credit + - boleto + - us_automated_bank_transfer + - eu_automated_bank_transfer + - uk_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + - custom + free_period: + minimum: 1 + type: integer + description: | + The period of time by which the first term of the subscription is to be extended free-of-charge. The value must be in multiples of free_period_unit. + format: int32 + deprecated: false + free_period_unit: + type: string + description: | + The unit of time in multiples of which the free_period parameter is expressed. The value must be equal to or lower than the [period_unit](/docs/api/plans#create_a_plan_period_unit) attribute of the [plan](/docs/api/subscriptions#create_a_subscription_plan_id) chosen. \* year - Charge based on year(s) \* day - Charge based on day(s) \* month - Charge based on month(s) \* week - Charge based on week(s) + deprecated: false + enum: + - day + - week + - month + - year + trial_end_action: + type: string + description: | + Applicable only when [End-of-trial Action](https://www.chargebee.com/docs/2.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions) has been enabled for the site. Whenever the subscription has a trial period, this attribute (parameter) is returned (required) and specifies the operation to be carried out for the subscription once the trial ends. \* activate_subscription - The subscription activates and charges are raised for non-metered items. \* cancel_subscription - The subscription cancels. \* plan_default - The action [configured for the site](https://www.chargebee.com/docs/trial_periods.html#how-to-define-the-end-of-trial-actions-for-subscriptions) at the time when the trial ends, takes effect. This is the default value when `trial_end_action` is defined for the plan. \* site_default - The action [configured for the site](https://www.chargebee.com/docs/trial_periods.html#how-to-define-the-end-of-trial-actions-for-subscriptions) at the time when the trial ends, takes effect. This is the default value when `trial_end_action` is **not** defined for the plan. + deprecated: false + enum: + - site_default + - plan_default + - activate_subscription + - cancel_subscription + description: | + Parameters for subscription + deprecated: false + billing_address: + type: object + properties: + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for billing_address + deprecated: false + shipping_address: + type: object + properties: + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for shipping_address + deprecated: false + customer: + type: object + properties: + vat_number: + maxLength: 20 + type: string + description: | + VAT number of this customer. If not provided then taxes are not calculated for the estimate. Applicable only when taxes are configured for the EU or UK region. VAT validation is not done for this. + deprecated: false + vat_number_prefix: + maxLength: 10 + type: string + description: "An overridden value for the first two characters\ + \ of the [full VAT\nnumber](https://en.wikipedia.org/wiki/VAT_identification_number).\ + \ Only applicable specifically for customers with [billing_address](customers#customer_billing_address)\ + \ `country` as `XI` (which is **United Kingdom - Northern\ + \ Ireland** ). \n\nWhen you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or have [manually\nenabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, you have the option of setting\ + \ [billing_address](customers#customer_billing_address) `country`\ + \ as `XI`. That's the code for **United Kingdom - Northern\n\ + Ireland** . The first two characters of the VAT number in\ + \ such a case is `XI` by default. However, if the VAT number\ + \ was registered in UK, the value should be `GB`. Set `vat_number_prefix`\ + \ to `GB` for such cases.\n" + deprecated: false + registered_for_gst: + type: boolean + description: | + Confirms that a customer is registered under GST. If set to `true` then the [Reverse Charge Mechanism](https://www.chargebee.com/docs/australian-gst.html#reverse-charge-mechanism) is applicable. This field is applicable only when Australian GST is configured for your site. + deprecated: false + description: | + Parameters for customer + deprecated: false + subscription_items: + required: + - item_price_id + type: object + properties: + item_price_id: + type: array + description: | + The unique identifier of the item price. + items: + maxLength: 100 + type: string + deprecated: false + quantity: + type: array + description: | + The quantity of the item purchased + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + unit_price: + type: array + description: | + The price/per unit price of the item. When not provided, [the value set](/docs/api/item_prices?prod_cat_ver=2#item_price_attributes) for the item price is used. This is only applicable when the `pricing_model` of the item price is `flat_fee` or `per_unit`. Also, it is only allowed when [price overriding](https://www.chargebee.com/docs/price-override.html) is enabled for the site. The value depends on the type of currency. If `changes_scheduled_at` is in the past and a `unit_price` is not passed, then the item price's current unit price is considered even if the item price did not exist on the date as of when the change is scheduled. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + unit_price_in_decimal: + type: array + description: | + When [price overriding](https://www.chargebee.com/docs/price-override.html) is enabled for the site, the price or per-unit price of the item can be set here. The [value set for the item price](/docs/api/item_prices#item_price_price) is used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api#handling_currency_units) is enabled. If `changes_scheduled_at` is in the past and a `unit_price_in_decimal` is not passed, then the item price's current unit price is considered even if the item price did not exist on the date as of when the change is scheduled. + items: + maxLength: 39 + type: string + deprecated: false + billing_cycles: + type: array + description: "For the plan-item price: \nthe value determines\ + \ the number of billing cycles the subscription runs before\ + \ canceling automatically. If not provided, then [the value\ + \ set](./item_prices?prod_cat_ver=2#item_price_attributes)\ + \ for the plan-item price is used. \n\nFor addon-item prices:\ + \ \nIf [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html)\ + \ are enabled then this is the number of subscription billing\ + \ cycles for which the addon is included. If not provided,\ + \ then [the value set under attached addons](./attached_items?prod_cat_ver=2#attached_item_attributes)\ + \ is used. Further, if that value is not provided, then [the\ + \ value set for the addon-item price](./item_prices?prod_cat_ver=2#item_price_attributes)\ + \ is used.\n" + items: + minimum: 0 + type: integer + format: int32 + deprecated: false + trial_end: + type: array + description: | + The date/time when the trial period of the item ends. Applies to plan-items and----when [enabled](https://www.chargebee.com/docs/2.0/addons-trial.html)----addon-items as well. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + service_period_days: + type: array + description: | + The service period of the item in days from the day of charge. + items: + maximum: 730 + minimum: 1 + type: integer + format: int32 + deprecated: false + charge_on_event: + type: array + items: + type: string + description: | + When `charge_on_option` option is set to `on_event`, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items. \* contract_termination - when a contract term is [terminated](./subscriptions?prod_cat_ver=2#cancel_subscription_for_items_contract_term_cancel_option). \* subscription_trial_start - the time when the trial period of the subscription begins. \* plan_activation - same as subscription activation, but also includes the case when the plan-item of the subscription is changed. \* subscription_activation - the moment a subscription enters an `active` or `non-renewing` state. Also includes reactivations of canceled subscriptions. \* subscription_creation - the time of creation of the subscription. + deprecated: false + enum: + - subscription_creation + - subscription_trial_start + - plan_activation + - subscription_activation + - contract_termination + charge_once: + type: array + description: | + Indicates if the charge-item is to be charged only once or each time the `charge_on_event` occurs. This parameter only applies to charge-items. + items: + type: boolean + deprecated: false + charge_on_option: + type: array + items: + type: string + description: | + Indicates when the charge-item is to be charged. This parameter only applies to charge-items. \* on_event - The item is charged at the occurrence of the event specified as `charge_on_event`. \* immediately - The item is charged immediately on being added to the subscription. + deprecated: false + enum: + - immediately + - on_event + proration_type: + type: array + items: + type: string + description: "**Note**\n\nApplicable only for item prices\ + \ with:\n\n* [item_type](item_prices?prod_cat_ver=2#item_price_item_type)\ + \ = `addon`.\n* [pricing_model](item_prices?prod_cat_ver=2#item_price_pricing_model)\ + \ = `per_unit`.\nSpecifies how to manage charges or credits\ + \ for the addon item price for this subscription update\ + \ estimate. You may use this parameter only if the change\ + \ to the subscription takes effect [immediately](subscriptions?prod_cat_ver=2#update_subscription_for_items_change_option).\ + \ \n**Note** : If you don't provide a value, Chargebee\ + \ determines the proration logic based on the following\ + \ precedence: this parameter \\> [prorate](estimates?prod_cat_ver=2#estimate_for_updating_a_subscription_prorate)\ + \ parameter \\> [item_price.proration_type](item_prices?prod_cat_ver=2#item_price_proration_type)\ + \ \\> [site-wide proration](https://www.chargebee.com/docs/2.0/proration.html#proration-for-subscription-change)\ + \ setting.\n\\* none - Don't apply any charges or credits\ + \ for the addon. \\* partial_term - Prorate the charges\ + \ or credits for the rest of the current term. \\* full_term\ + \ - Charge the full price of the addon or give the full\ + \ credit. Don't apply any proration.\n" + deprecated: false + enum: + - full_term + - partial_term + - none + description: | + Parameters for subscription_items + deprecated: false + discounts: + required: + - apply_on + - duration_type + - operation_type + type: object + properties: + apply_on: + type: array + items: + type: string + description: | + The amount on the invoice to which the discount is applied. \* invoice_amount - The discount is applied to the invoice `sub_total`. \* specific_item_price - The discount is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id`. + deprecated: false + enum: + - invoice_amount + - specific_item_price + duration_type: + type: array + items: + type: string + description: | + Specifies the time duration for which this discount is attached to the subscription. \* forever - The discount is attached to the subscription and applied on the invoices till it is [explicitly removed](/docs/api/subscriptions?prod_cat_ver=2#update_subscription_for_items_discounts_operation_type). \* limited_period - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period` and `period_unit`. \* one_time - The discount stays attached to the subscription till it is applied on an invoice **once**. It is removed after that from the subscription. + deprecated: false + default: forever + enum: + - one_time + - forever + - limited_period + percentage: + type: array + description: | + The percentage of the original amount that should be deducted from it. Only applicable when `discount.type` is percentage. + items: + maximum: 100 + minimum: 0.01 + type: number + format: double + deprecated: false + amount: + type: array + description: | + The value of the discount. [The format of this value](https://apidocs.chargebee.com/docs/api?prod_cat_ver=2#currencies) depends on the kind of currency. This is only applicable when `discount.type` is `fixed_amount`. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + period: + type: array + description: | + The duration of time for which the discount is attached to the subscription, in `period_units`. Applicable only when `duration_type` is `limited_period`. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + period_unit: + type: array + items: + type: string + description: | + The unit of time for `period`. Applicable only when `duration_type` is `limited_period`. \* day - A period of 24 hours. \* week - A period of 7 days. \* month - A period of 1 calendar month. \* year - A period of 1 calendar year. + deprecated: false + enum: + - day + - week + - month + - year + included_in_mrr: + type: array + description: | + The discount is included in MRR calculations for your site. This attribute is only applicable when `duration_type` is `one_time` and when the [feature is enabled](https://www.chargebee.com/docs/reporting.html#dashboards_flexible-mrr-calculation) in Chargebee. Also, If the [site-level setting](https://www.chargebee.com/docs/reporting.html#chart_flexible-mrr-calculation) is to exclude one-time discounts from MRR calculations, this value is always returned `false`. + items: + type: boolean + deprecated: false + item_price_id: + type: array + description: | + The [id of the item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) in the subscription to which the discount is to be applied. Relevant only when `apply_on` = `specific_item_price`. + items: + maxLength: 100 + type: string + deprecated: false + operation_type: + type: array + items: + type: string + description: | + The operation to be carried out for the discount. \* add - The discount is attached to the subscription. \* remove - The discount (given by `discounts[id]`) is removed from the subscription. Subsequent invoices will no longer have the discount applied. **Tip:** If you want to replace a discount, `remove` it and `add` another in the same API call. + deprecated: false + enum: + - add + - remove + id: + type: array + description: | + An immutable unique id for the discount. It is always auto-generated. + items: + maxLength: 50 + type: string + deprecated: false + description: | + Parameters for discounts + deprecated: false + item_tiers: + type: object + properties: + item_price_id: + type: array + description: | + The id of the item price for which the tier price is being overridden. + items: + maxLength: 100 + type: string + deprecated: false + starting_unit: + type: array + description: | + The lowest value in the quantity tier. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + ending_unit: + type: array + description: | + The highest value in the quantity tier. + items: + type: integer + format: int32 + deprecated: false + price: + type: array + description: | + The overridden price of the tier. The value depends on the [type of currency](./#handling_currency_units). + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + default: 0 + starting_unit_in_decimal: + type: array + description: | + The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal` of the next lower tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + ending_unit_in_decimal: + type: array + description: | + The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal` of the next higher tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + price_in_decimal: + type: array + description: | + The decimal representation of the per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. When the `pricing_model` is `stairstep`, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: | + Parameters for item_tiers + deprecated: false + encoding: + billing_address: + style: deepObject + explode: true + customer: + style: deepObject + explode: true + discounts: + style: deepObject + explode: true + item_tiers: + style: deepObject + explode: true + shipping_address: + style: deepObject + explode: true + subscription: + style: deepObject + explode: true + subscription_items: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - estimate + type: object + properties: + estimate: + $ref: '#/components/schemas/Estimate' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/upcoming_invoices_estimate: + get: + summary: Upcoming invoices estimate + description: | + Estimate of the upcoming scheduled invoices (subscription activations, renewals etc) of a customer. For now preview of the invoices generated on the immediate upcoming date is supported. Say a customer has couple of subscription renewals scheduled on *Jan,10th* and another subscription renewal scheduled on *Jan,15th* . This API gives the preview of all the invoices scheduled to be generated on *Jan,10th* (immediate upcoming date). + + In the response: + + * **estimate.invoice_estimates\[\]** has details of the invoices scheduled to be generated. + + **Note:** If *consolidated invoicing* is enabled you may use this API to test whether upcoming renewals are consolidated. + operationId: upcoming_invoices_estimate + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\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])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - estimate + type: object + properties: + estimate: + $ref: '#/components/schemas/Estimate' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/regenerate_invoice_estimate: + post: + summary: Regenerate Invoice Estimate + description: |+ + Regenerates the invoice for the current term of the subscription. The subscription must have `status` as `active` or `non_renewing`. This operation is not allowed when any of the following conditions hold true for the subscription: + + * An invoice exists for the current term and its `status` is not `voided`. + * There are [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html) for the current term. + * The subscription has an [advance invoice](https://www.chargebee.com/docs/advance-invoices.html). + + + + #### Response + + Returns an `estimate` object with one of the following components depending on the value of `invoice_immediately`. + + * If the value is `true`: an `invoice_estimate` object that corresponds to the regenerated invoice. + * If the value is `false`: a list of `unbilled_charge_estimate` objects corresponding to all the unbilled charges created for the current term of the subscription. + + + + operationId: regenerate_invoice_estimate + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA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fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + date_from: + pattern: "^[0-9]{10}$" + type: integer + description: | + The start date of the period being invoiced. The default value is [current_term_start](https://apidocs.chargebee.com/docs/api/subscriptions#subscription_current_term_start ). + format: unix-time + deprecated: false + date_to: + pattern: "^[0-9]{10}$" + type: integer + description: | + The end date of the period being invoiced. The default value is [current_term_end](https://apidocs.chargebee.com/docs/api/subscriptions#subscription_current_term_end ). + format: unix-time + deprecated: false + prorate: + type: boolean + description: | + Whether the charges should be prorated according to the term specified by `date_from` and `date_to`. Should not be passed without `date_from` and `date_to`. + deprecated: false + invoice_immediately: + type: boolean + description: | + Only applicable when [Consolidated Invoicing](https://www.chargebee.com/docs/consolidated-invoicing.html ) is enabled for the customer. Set to `false` to leave the current term charge for the subscription as [unbilled](https://www.chargebee.com/docs/unbilled-charges.html ). Once you have done this for all suitable subscriptions of the customer, call [Create an invoice for unbilled charges](https://apidocs.chargebee.com/docs/api/unbilled_charges#create_an_invoice_for_unbilled_charges ) to invoice them. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - estimate + type: object + properties: + estimate: + $ref: '#/components/schemas/Estimate' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/create_subscription_for_items_estimate: + post: + summary: Estimate for creating a subscription + description: "Generates an estimate without creating a subscription. This endpoint\ + \ can be called when you want to preview details of a new subscription before\ + \ actually creating one. \n**See also**\n\n* [Estimate a purchase](https://apidocs.chargebee.com/docs/api/purchases#estimates_for_purchase):\ + \ an operation that estimates a `purchase` representing multiple subscriptions\ + \ bought together by a customer.\n" + operationId: estimate_for_creating_a_subscription + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{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-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + use_existing_balances: + type: boolean + description: | + The generated invoice_estimate/next_invoice_estimate will include all the balances - Promotional Credits, Refundable Credits, and Excess Payments - if any. If you don't want these balances to be included you can specify 'false' for the parameter *use_existing_balances*. + deprecated: false + default: true + invoice_immediately: + type: boolean + description: "If there are charges raised immediately for the subscription,\ + \ this parameter specifies whether those charges are to be invoiced\ + \ immediately or added to [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html).\ + \ The default value is as per the [site settings](https://www.chargebee.com/docs/unbilled-charges.html#configuration).\ + \ \n**Note:** `invoice_immediately` only affects charges that\ + \ are raised at the time of execution of this API call. Any charges\ + \ scheduled to be raised in the future are not affected by this\ + \ parameter. .\n" + deprecated: false + billing_cycles: + minimum: 0 + type: integer + description: | + The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles [set for the plan-item price](https://apidocs.chargebee.com/docs/api/item_prices?prod_cat_ver=2#item_price_billing_cycles) is used. + format: int32 + deprecated: false + mandatory_items_to_remove: + type: array + description: | + Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver=2) that are to be removed from the subscription. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + terms_to_charge: + minimum: 1 + type: integer + description: | + The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html). + format: int32 + deprecated: false + billing_alignment_mode: + type: string + description: | + Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date) for Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site. \* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly.. \* delayed - Subscription period will be aligned with the configured billing date at the next renewal. + deprecated: false + enum: + - immediate + - delayed + invoice_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The document date displayed on the invoice PDF. By default, it is the date of creation of the invoice or, when Metered Billing is enabled, it can be the date of closing the invoice. Provide this value to backdate the invoice (set the invoice date to a value in the past). Backdating an invoice is done for reasons such as booking revenue for a previous date or when the non-recurring charge is effective as of a past date. `taxes` and `line_item_taxes` are computed based on the tax configuration as of this date. The date should not be more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December. + format: unix-time + deprecated: false + coupon_ids: + type: array + description: | + List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + subscription: + type: object + properties: + id: + maxLength: 50 + type: string + description: | + A unique and immutable identifier for the subscription. If not provided, it is autogenerated. + deprecated: false + trial_end: + pattern: "^[0-9]{10}$" + type: integer + description: | + End of the trial period for the subscription. This overrides the trial period set for the plan-item. The value must be later than `start_date`. Set it to `0` to have no trial period. + format: unix-time + deprecated: false + start_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The date/time at which the subscription is to start. If not provided, the subscription starts immediately. You can provide a value in the past as well. This is called backdating the subscription creation and is done when the subscription has already been provisioned but its billing has been delayed. Backdating is allowed only when the following prerequisites are met: + + * Backdating is enabled for subscription creation operations. + * The current day of the month does not exceed the limit set in Chargebee for backdating such operations. This day is typically the day of the month by which the accounting for the previous month must be closed. + * The date is not more than duration X into the past, where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `start_date` cannot be earlier than 14th February. + format: unix-time + deprecated: false + free_period: + minimum: 1 + type: integer + description: | + The period of time by which the first term of the subscription is to be extended free-of-charge. The value must be in multiples of free_period_unit. + format: int32 + deprecated: false + free_period_unit: + type: string + description: | + The unit of time in multiples of which the free_period parameter is expressed. The value must be equal to or lower than the [period_unit](/docs/api/plans#create_a_plan_period_unit) attribute of the [plan](/docs/api/subscriptions#create_a_subscription_plan_id) chosen. \* year - Charge based on year(s) \* day - Charge based on day(s) \* month - Charge based on month(s) \* week - Charge based on week(s) + deprecated: false + enum: + - day + - week + - month + - year + contract_term_billing_cycle_on_renewal: + maximum: 100 + minimum: 1 + type: integer + description: | + Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles` or a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms). + format: int32 + deprecated: false + trial_end_action: + type: string + description: | + Applicable only when [End-of-trial Action](https://www.chargebee.com/docs/2.0/trial_periods_hidden.html#how-to-define-the-end-of-trial-actions-for-subscriptions) has been enabled for the site. Whenever the subscription has a trial period, this attribute (parameter) is returned (required) and specifies the operation to be carried out for the subscription once the trial ends. \* activate_subscription - The subscription activates and charges are raised for non-metered items. \* cancel_subscription - The subscription cancels. \* plan_default - The action [configured for the site](https://www.chargebee.com/docs/trial_periods.html#how-to-define-the-end-of-trial-actions-for-subscriptions) at the time when the trial ends, takes effect. This is the default value when `trial_end_action` is defined for the plan. \* site_default - The action [configured for the site](https://www.chargebee.com/docs/trial_periods.html#how-to-define-the-end-of-trial-actions-for-subscriptions) at the time when the trial ends, takes effect. This is the default value when `trial_end_action` is **not** defined for the plan. + deprecated: false + enum: + - site_default + - plan_default + - activate_subscription + - cancel_subscription + description: | + Parameters for subscription + deprecated: false + shipping_address: + type: object + properties: + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for shipping_address + deprecated: false + billing_address: + type: object + properties: + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://i18napis.appspot.com/address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for billing_address + deprecated: false + contract_term: + type: object + properties: + action_at_term_end: + type: string + description: |+ + Action to be taken when the contract term completes. \* evergreen - Contract term completes and the subscription renews. \* renew - + * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](subscriptions#create_subscription_for_customer_contract_term_billing_cycle_on_renewal). + * The `action_at_term_end` for the new contract term is set to `renew`. + \* cancel - Contract term completes and subscription is canceled. + + deprecated: false + enum: + - renew + - evergreen + - cancel + cancellation_cutoff_period: + type: integer + description: | + The number of days before [`contract_end`](contract_terms#contract_term_contract_end), during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure + format: int32 + deprecated: false + default: 0 + description: | + Parameters for contract_term + deprecated: false + subscription_items: + required: + - item_price_id + type: object + properties: + item_price_id: + type: array + description: | + The unique identifier of the item price. + items: + maxLength: 100 + type: string + deprecated: false + quantity: + type: array + description: | + The quantity of the item purchased + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + unit_price: + type: array + description: | + The price/per unit price of the item. When not provided, [the value set](/docs/api/item_prices?prod_cat_ver=2#item_price_attributes) for the item price is used. This is only applicable when the `pricing_model` of the item price is `flat_fee` or `per_unit`. Also, it is only allowed when [price overriding](https://www.chargebee.com/docs/price-override.html) is enabled for the site. The value depends on the type of currency. If `changes_scheduled_at` is in the past and a `unit_price` is not passed, then the item price's current unit price is considered even if the item price did not exist on the date as of when the change is scheduled. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + unit_price_in_decimal: + type: array + description: | + When [price overriding](https://www.chargebee.com/docs/2.0/price-override.html) is enabled for the site, the price or per-unit price of the item can be set here. The [value set for the item price](https://apidocs.chargebee.com/docs/api/item_prices#item_price_price) is used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + billing_cycles: + type: array + description: "For the plan-item price: \nthe value determines\ + \ the number of billing cycles the subscription runs before\ + \ canceling automatically. If not provided, then [the value\ + \ set](./item_prices?prod_cat_ver=2#item_price_attributes)\ + \ for the plan-item price is used. \n\nFor addon-item prices:\ + \ \nIf [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html)\ + \ are enabled then this is the number of subscription billing\ + \ cycles for which the addon is included. If not provided,\ + \ then [the value set under attached addons](./attached_items?prod_cat_ver=2#attached_item_attributes)\ + \ is used. Further, if that value is not provided, then [the\ + \ value set for the addon-item price](./item_prices?prod_cat_ver=2#item_price_attributes)\ + \ is used.\n" + items: + minimum: 0 + type: integer + format: int32 + deprecated: false + trial_end: + type: array + description: | + The date/time when the trial period of the item ends. Applies to plan-items and----when [enabled](https://www.chargebee.com/docs/2.0/addons-trial.html)----addon-items as well. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + service_period_days: + type: array + description: | + The service period of the item in days from the day of charge. + items: + maximum: 730 + minimum: 1 + type: integer + format: int32 + deprecated: false + charge_on_event: + type: array + items: + type: string + description: | + When `charge_on_option` option is set to `on_event`, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items. \* contract_termination - when a contract term is [terminated](./subscriptions?prod_cat_ver=2#cancel_subscription_for_items_contract_term_cancel_option). \* subscription_trial_start - the time when the trial period of the subscription begins. \* plan_activation - same as subscription activation, but also includes the case when the plan-item of the subscription is changed. \* subscription_activation - the moment a subscription enters an `active` or `non-renewing` state. Also includes reactivations of canceled subscriptions. \* subscription_creation - the time of creation of the subscription. + deprecated: false + enum: + - subscription_creation + - subscription_trial_start + - plan_activation + - subscription_activation + - contract_termination + charge_once: + type: array + description: | + Indicates if the charge-item is to be charged only once or each time the `charge_on_event` occurs. This parameter only applies to charge-items. + items: + type: boolean + deprecated: false + charge_on_option: + type: array + items: + type: string + description: | + Indicates when the charge-item is to be charged. This parameter only applies to charge-items. \* on_event - The item is charged at the occurrence of the event specified as `charge_on_event`. \* immediately - The item is charged immediately on being added to the subscription. + deprecated: false + enum: + - immediately + - on_event + description: | + Parameters for subscription_items + deprecated: false + discounts: + required: + - apply_on + - duration_type + type: object + properties: + apply_on: + type: array + items: + type: string + description: | + The amount on the invoice to which the discount is applied. \* invoice_amount - The discount is applied to the invoice `sub_total`. \* specific_item_price - The discount is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id`. + deprecated: false + enum: + - invoice_amount + - specific_item_price + duration_type: + type: array + items: + type: string + description: | + Specifies the time duration for which this discount is attached to the subscription. \* forever - The discount is attached to the subscription and applied on the invoices till it is [explicitly removed](/docs/api/subscriptions?prod_cat_ver=2#update_subscription_for_items_discounts_operation_type). \* limited_period - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period` and `period_unit`. \* one_time - The discount stays attached to the subscription till it is applied on an invoice **once**. It is removed after that from the subscription. + deprecated: false + default: forever + enum: + - one_time + - forever + - limited_period + percentage: + type: array + description: | + The percentage of the original amount that should be deducted from it. Only applicable when `discount.type` is percentage. + items: + maximum: 100 + minimum: 0.01 + type: number + format: double + deprecated: false + amount: + type: array + description: | + The value of the discount. [The format of this value](https://apidocs.chargebee.com/docs/api?prod_cat_ver=2#currencies) depends on the kind of currency. This is only applicable when `discount.type` is `fixed_amount`. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + period: + type: array + description: | + The duration of time for which the discount is attached to the subscription, in `period_units`. Applicable only when `duration_type` is `limited_period`. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + period_unit: + type: array + items: + type: string + description: | + The unit of time for `period`. Applicable only when `duration_type` is `limited_period`. \* day - A period of 24 hours. \* week - A period of 7 days. \* month - A period of 1 calendar month. \* year - A period of 1 calendar year. + deprecated: false + enum: + - day + - week + - month + - year + included_in_mrr: + type: array + description: | + The discount is included in MRR calculations for your site. This attribute is only applicable when `duration_type` is `one_time` and when the [feature is enabled](https://www.chargebee.com/docs/reporting.html#dashboards_flexible-mrr-calculation) in Chargebee. Also, If the [site-level setting](https://www.chargebee.com/docs/reporting.html#chart_flexible-mrr-calculation) is to exclude one-time discounts from MRR calculations, this value is always returned `false`. + items: + type: boolean + deprecated: false + item_price_id: + type: array + description: | + The [id of the item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) in the subscription to which the discount is to be applied. Relevant only when `apply_on` = `specific_item_price`. + items: + maxLength: 100 + type: string + deprecated: false + description: | + Parameters for discounts + deprecated: false + item_tiers: + type: object + properties: + item_price_id: + type: array + description: | + The id of the item price for which the tier price is being overridden. + items: + maxLength: 100 + type: string + deprecated: false + starting_unit: + type: array + description: | + The lowest value in the quantity tier. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + ending_unit: + type: array + description: | + The highest value in the quantity tier. + items: + type: integer + format: int32 + deprecated: false + price: + type: array + description: | + The overridden price of the tier. The value depends on the [type of currency](./#handling_currency_units). + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + default: 0 + starting_unit_in_decimal: + type: array + description: | + The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal` of the next lower tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + ending_unit_in_decimal: + type: array + description: | + The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal` of the next higher tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + price_in_decimal: + type: array + description: | + The decimal representation of the per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. When the `pricing_model` is `stairstep`, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: | + Parameters for item_tiers + deprecated: false + encoding: + billing_address: + style: deepObject + explode: true + contract_term: + style: deepObject + explode: true + discounts: + style: deepObject + explode: true + item_tiers: + style: deepObject + explode: true + shipping_address: + style: deepObject + explode: true + subscription: + style: deepObject + explode: true + subscription_items: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - estimate + type: object + properties: + estimate: + $ref: '#/components/schemas/Estimate' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/change_term_end_estimate: + post: + summary: Subscription change term end estimate + description: | + Generates an estimate for the 'change term end' operation. This is similar to the [Change term end](/docs/api/subscriptions#change_term_end) API but the subscription's term end will not be changed, only an estimate for this operation is created. This is applicable only for subscriptions in 'in-trial', 'active' and 'non-renewing' states. + + In the response, + + * **estimate.subscription_estimate** has the subscription details like the status of the subscription (in_trial, active, etc.), next billing date, and so on. + * **estimate.invoice_estimate** has details of the invoice that will be generated immediately. This will not be present if no immediate invoice is generated for this operation. This will happen when + * *prorate* parameter is false, or + * *invoice_immediately* parameter is false, or + * subscription is in *in-trial* state + * **estimate.credit_note_estimates\[\]** has details of the credit-notes that will get generated during this operation. This list will be empty if no credit-note gets generated during this operation. + * **estimate.unbilled_charge_estimates\[\]** has details of the unbilled charges. This is returned only if *invoice_immediately* is set as false. + operationId: subscription_change_term_end_estimate + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F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,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - term_ends_at + type: object + properties: + term_ends_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + The time at which the current term should end for this subscription. + format: unix-time + deprecated: false + prorate: + type: boolean + description: | + Applicable for *active* / *non_renewing* subscriptions. If specified as *true* prorated charges / credits will be added during this operation. + deprecated: false + invoice_immediately: + type: boolean + description: "If there are charges raised immediately for the subscription,\ + \ this parameter specifies whether those charges are to be invoiced\ + \ immediately or added to [unbilled charges](https://www.chargebee.com/docs/unbilled-charges.html).\ + \ The default value is as per the [site settings](https://www.chargebee.com/docs/unbilled-charges.html#configuration).\ + \ \n**Note:** `invoice_immediately` only affects charges that\ + \ are raised at the time of execution of this API call. Any charges\ + \ scheduled to be raised in the future are not affected by this\ + \ parameter. .\n" + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - estimate + type: object + properties: + estimate: + $ref: '#/components/schemas/Estimate' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/pause_subscription_estimate: + post: + summary: Pause subscription estimate + description: | + This API provides an estimate of the details pertaining to the [pause_subscription](/docs/api/subscriptions#pause_a_subscription) operation. It returns attributes such as [pause_date](/docs/api/estimates#estimate_subscription_estimate_pause_date) and [resume_date](/docs/api/estimates#estimate_subscription_estimate_resume_date). This is similar to the [Pause a subscription](/docs/api/subscriptions#pause_a_subscription) API with the exception that the subscription is not paused. Only an estimate for this operation is created. + + In the response, + + * **estimate.subscription_estimate** has the subscription details. + * **estimate.invoice_estimate** has details of the invoice that are generated immediately. This is not present if no immediate invoices are generated for this operation. + * **estimate.credit_note_estimates\[\]** has details of the credit notes that are generated during this operation. This list is empty if no credit notes are generated. + operationId: pause_subscription_estimate + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?: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9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + pause_option: + type: string + description: | + List of options to pause the subscription. \* billing_cycles - + + Pause at the end of the current term, and resume automatically after the number of billing cycles you specify in [skip_billing_cycles](/docs/api/estimates?prod_cat_ver=2#pause_subscription_estimate_subscription_skip_billing_cycles) + \* immediately - Pause immediately + \* end_of_term - Pause at the end of current term + \* specific_date - Pause on a specific date + deprecated: false + enum: + - immediately + - end_of_term + - specific_date + - billing_cycles + unbilled_charges_handling: + type: string + description: | + Applicable when unbilled charges are present for the subscription and [pause_option](/docs/api/estimates#pause_subscription_estimate_pause_option) is set as `immediately`. **Note:** On the invoice raised, an automatic charge is attempted on the payment method available, if customer's auto-collection property is set to `on`. + \* invoice - + + Invoice charges + + If `invoice` is chosen, an automatic charge is attempted on the payment method available if the customer has enabled auto-collection. If a payment collection fails or when auto-collection is not enabled, the invoice is closed as unpaid. + \* no_action - + + Retain as unbilled + + If `no_action` is chosen, charges are added to the resumption invoice. + deprecated: false + enum: + - no_action + - invoice + subscription: + type: object + properties: + pause_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + When a pause has been scheduled, it is the date/time of scheduled pause. When the subscription is in the `paused` state, it is the date/time when the subscription was paused. + format: unix-time + deprecated: false + resume_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + For a paused subscription, it is the date/time when the subscription is scheduled to resume. If the pause is for an indefinite period, this value is not returned. + format: unix-time + deprecated: false + skip_billing_cycles: + minimum: 1 + type: integer + description: | + Number of billing cycles this subscription should be paused. The subscription resumes after the paused billing cycles end. + format: int32 + deprecated: false + description: | + Parameters for subscription + deprecated: false + encoding: + subscription: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - estimate + type: object + properties: + estimate: + $ref: '#/components/schemas/Estimate' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/advance_invoice_estimate: + post: + summary: Advance invoice estimate + description: | + This API is used to generate an invoice estimate for preview. Estimate details include the number of billing cycles to be invoiced in advance, the number of billing cycles in one interval, advance invoicing schedules, and so on. + operationId: advance_invoice_estimate + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]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-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + terms_to_charge: + minimum: 1 + type: integer + description: | + * For `schedule_type = immediate`: the number of future billing cycles to be invoiced in advance. The invoicing is done for the [`remaining_billing_cycles`](subscriptions#subscription_remaining_billing_cycles) of the subscription if that is less than `terms_to_charge`. + * For `schedule_type = fixed_intervals`: The number of future billing cycles in one [interval](advance_invoice_schedules#fixed_interval_schedule). The schedule is created such that the total number of billing cycles in the schedule does not exceed the [remaining_billing_cycles](subscriptions#subscription_remaining_billing_cycles) of the subscription. + . + format: int32 + deprecated: false + default: 1 + invoice_immediately: + type: boolean + description: | + Whether the charge should be invoiced immediately or added to [`unbilled_charges`](unbilled_charges). Applicable only when [`schedule_type`](subscriptions#charge_future_renewals_schedule_type) is `immediate`. + deprecated: false + schedule_type: + type: string + description: | + The type of advance invoice or advance invoicing schedule. \* immediate - Charge immediately for the number of billing cycles specified by [`terms_to_charge`](subscriptions#charge_future_renewals_terms_to_charge). \* specific_dates - Charge on [specific dates](subscriptions#charge_future_renewals_specific_dates_schedule_date). For each date, specify the [number of billing cycles](subscriptions#charge_future_renewals_specific_dates_schedule_terms_to_charge) to charge for. Up to 5 dates can be configured. \* fixed_intervals - Charge at fixed intervals of time. Specify the [number of billing cycles](subscriptions#charge_future_renewals_terms_to_charge) that constitute an interval and the number of [days before each interval](subscriptions#charge_future_renewals_fixed_interval_schedule_days_before_renewal) that the invoice should be generated. Also specify [when the schedule should end](subscriptions#charge_future_renewals_fixed_interval_schedule_end_schedule_on). + deprecated: false + enum: + - immediate + - specific_dates + - fixed_intervals + fixed_interval_schedule: + type: object + properties: + number_of_occurrences: + minimum: 1 + type: integer + description: | + The number of advance invoices to generate. The schedule is created such that the total number of billing cycles in the schedule does not exceed the [`remaining_billing_cycles`](subscriptions#subscription_remaining_billing_cycles) of the subscription. This parameter is applicable only when [`fixed_interval_schedule[end_schedule_on]`](advance_invoice_schedules#advance_invoice_schedule_fixed_interval_schedule_end_schedule_on) = `after_number_of_intervals` + format: int32 + deprecated: false + days_before_renewal: + minimum: 1 + type: integer + description: | + The number of days before each interval that advance invoices are generated. + format: int32 + deprecated: false + end_schedule_on: + type: string + description: | + Specifies when the schedule should end. \* after_number_of_intervals - Advance invoices are generated a `specified number of times` \* subscription_end - Advance invoices are generated for as long as the subscription is active. \* specific_date - End the advance invoicing schedule on a `specific date`. + deprecated: false + enum: + - after_number_of_intervals + - specific_date + - subscription_end + end_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The date when the schedule should end. Advance invoices are not generated beyond this date. It must be at least 1 day before the start of the last billing cycle of the subscription and also within 5 years from the current date. This parameter is only applicable when [`fixed_interval_schedule[end_schedule_on]`](advance_invoice_schedules#advance_invoice_schedule_fixed_interval_schedule_end_schedule_on) = `specific_date`. + format: unix-time + deprecated: false + description: | + Parameters for fixed_interval_schedule + deprecated: false + specific_dates_schedule: + type: object + properties: + terms_to_charge: + type: array + description: | + The number of billing cycles to charge for, on the date specified. Applicable only when [`schedule_type`](advance_invoice_schedules#advance_invoice_schedule_schedule_type) is specific_dates. + items: + type: integer + format: int32 + deprecated: false + date: + type: array + description: | + The unique id of the member of the advance_invoice_schedule array which corresponds to the specific_dates_schedule that you intend to modify. Only applicable when [`schedule_type`](advance_invoice_schedules#advance_invoice_schedule_schedule_type) is `specific_dates`. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + description: | + Parameters for specific_dates_schedule + deprecated: false + encoding: + fixed_interval_schedule: + style: deepObject + explode: true + specific_dates_schedule: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - estimate + type: object + properties: + estimate: + $ref: '#/components/schemas/Estimate' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /customers/{customer-id}/create_subscription_quote_for_items: + post: + summary: Create a quote for subscription creation + description: | + Create a quote for new subscription line items of a customer. + operationId: create_a_quote_for_a_new_subscription_items + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4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(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: customer-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + name: + maxLength: 100 + type: string + description: | + The quote name will be used as the pdf name of the quote. + deprecated: false + notes: + maxLength: 2000 + type: string + description: | + Notes specific to this quote that you want customers to see on the quote PDF. + deprecated: false + expires_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + Quotes will be valid till this date. After this quote will be marked as closed. + format: unix-time + deprecated: false + billing_cycles: + minimum: 0 + type: integer + description: | + The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles [set for the plan-item price](https://apidocs.chargebee.com/docs/api/item_prices?prod_cat_ver=2#item_price_billing_cycles) is used. + format: int32 + deprecated: false + mandatory_items_to_remove: + type: array + description: | + Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver=2) that are to be removed from the subscription. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + terms_to_charge: + minimum: 1 + type: integer + description: | + The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html). + format: int32 + deprecated: false + billing_alignment_mode: + type: string + description: | + Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date) for Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site. \* delayed - Subscription period will be aligned with the configured billing date at the next renewal. \* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly.. + deprecated: false + enum: + - immediate + - delayed + coupon_ids: + type: array + description: | + Identifier of the coupon as a List. Coupon Codes can also be passed. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + subscription: + type: object + properties: + id: + maxLength: 50 + type: string + description: | + A unique and immutable identifier for the subscription. If not provided, it is autogenerated. + deprecated: false + po_number: + maxLength: 100 + type: string + description: | + Purchase order number for this subscription. + deprecated: false + trial_end: + pattern: "^[0-9]{10}$" + type: integer + description: | + End of the trial period for the subscription. This overrides the trial period set for the plan-item. The value must be later than `start_date`. Set it to `0` to have no trial period. + format: unix-time + deprecated: false + start_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The date/time at which the subscription is to start or has started. If not provided, the subscription starts immediately on quote conversion. The quote can be converted on a date/time after this date. This is called backdating the subscription creation and is done when the subscription has already been provisioned but the conversion action has been delayed. Backdating is allowed only when the following prerequisites are met: + + * Backdating is enabled for subscription creation operations. + * The current day of the month does not exceed the limit set in Chargebee for backdating such operations. This day is typically the day of the month by which the accounting for the previous month must be closed. + * The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `subscription[start_date]` cannot be earlier than 14th February. + format: unix-time + deprecated: false + contract_term_billing_cycle_on_renewal: + maximum: 100 + minimum: 1 + type: integer + description: | + Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles` or a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms). + format: int32 + deprecated: false + description: | + Parameters for subscription + deprecated: false + shipping_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for shipping_address + deprecated: false + contract_term: + type: object + properties: + action_at_term_end: + type: string + description: |+ + Action to be taken when the contract term completes. \* evergreen - Contract term completes and the subscription renews. \* renew - + * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](subscriptions#create_subscription_for_customer_contract_term_billing_cycle_on_renewal). + * The `action_at_term_end` for the new contract term is set to `renew`. + \* cancel - Contract term completes and subscription is canceled. + + deprecated: false + enum: + - renew + - evergreen + - cancel + cancellation_cutoff_period: + type: integer + description: | + The number of days before [`contract_end`](contract_terms#contract_term_contract_end), during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure + format: int32 + deprecated: false + default: 0 + description: | + Parameters for contract_term + deprecated: false + subscription_items: + required: + - item_price_id + type: object + properties: + item_price_id: + type: array + description: | + The unique identifier of the item price. + items: + maxLength: 100 + type: string + deprecated: false + quantity: + type: array + description: | + The quantity of the item purchased + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + unit_price: + type: array + description: | + The price/per unit price of the item. When not provided, [the value set](/docs/api/item_prices?prod_cat_ver=2#item_price_attributes) for the item price is used. This is only applicable when the `pricing_model` of the item price is `flat_fee` or `per_unit`. Also, it is only allowed when [price overriding](https://www.chargebee.com/docs/price-override.html) is enabled for the site. The value depends on the type of currency. If `changes_scheduled_at` is in the past and a `unit_price` is not passed, then the item price's current unit price is considered even if the item price did not exist on the date as of when the change is scheduled. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + unit_price_in_decimal: + type: array + description: | + When [price overriding](https://www.chargebee.com/docs/2.0/price-override.html) is enabled for the site, the price or per-unit price of the item can be set here. The [value set for the item price](https://apidocs.chargebee.com/docs/api/item_prices#item_price_price) is used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + billing_cycles: + type: array + description: "For the plan-item price: \nthe value determines\ + \ the number of billing cycles the subscription runs before\ + \ canceling automatically. If not provided, then [the value\ + \ set](./item_prices?prod_cat_ver=2#item_price_attributes)\ + \ for the plan-item price is used. \n\nFor addon-item prices:\ + \ \nIf [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html)\ + \ are enabled then this is the number of subscription billing\ + \ cycles for which the addon is included. If not provided,\ + \ then [the value set under attached addons](./attached_items?prod_cat_ver=2#attached_item_attributes)\ + \ is used. Further, if that value is not provided, then [the\ + \ value set for the addon-item price](./item_prices?prod_cat_ver=2#item_price_attributes)\ + \ is used.\n" + items: + minimum: 0 + type: integer + format: int32 + deprecated: false + trial_end: + type: array + description: | + The date/time when the trial period of the item ends. Applies to plan-items and----when [enabled](https://www.chargebee.com/docs/2.0/addons-trial.html)----addon-items as well. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + service_period_days: + type: array + description: | + The service period of the item in days from the day of charge. + items: + maximum: 730 + minimum: 1 + type: integer + format: int32 + deprecated: false + charge_on_event: + type: array + items: + type: string + description: | + When `charge_on_option` option is set to `on_event`, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items. \* plan_activation - same as subscription activation, but also includes the case when the plan-item of the subscription is changed. \* subscription_activation - the moment a subscription enters an `active` or `non-renewing` state. Also includes reactivations of canceled subscriptions. \* contract_termination - when a contract term is [terminated](./subscriptions?prod_cat_ver=2#cancel_subscription_for_items_contract_term_cancel_option). \* subscription_trial_start - the time when the trial period of the subscription begins. \* subscription_creation - the time of creation of the subscription. + deprecated: false + enum: + - subscription_creation + - subscription_trial_start + - plan_activation + - subscription_activation + - contract_termination + charge_once: + type: array + description: | + Indicates if the charge-item is to be charged only once or each time the `charge_on_event` occurs. This parameter only applies to charge-items. + items: + type: boolean + deprecated: false + charge_on_option: + type: array + items: + type: string + description: | + Indicates when the charge-item is to be charged. This parameter only applies to charge-items. \* on_event - The item is charged at the occurrence of the event specified as `charge_on_event`. \* immediately - The item is charged immediately on being added to the subscription. + deprecated: false + enum: + - immediately + - on_event + description: | + Parameters for subscription_items + deprecated: false + discounts: + required: + - apply_on + - duration_type + type: object + properties: + apply_on: + type: array + items: + type: string + description: | + The amount on the quote to which the discount is applied. \* invoice_amount - The discount is applied to the invoice `sub_total`. \* specific_item_price - The discount is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id`. + deprecated: false + enum: + - invoice_amount + - specific_item_price + duration_type: + type: array + items: + type: string + description: | + Specifies the time duration for which this discount is attached to the subscription. \* forever - The discount is attached to the subscription and applied on the invoices till it is [explicitly removed](/docs/api/subscriptions?prod_cat_ver=2#update_subscription_for_items_discounts_operation_type). \* one_time - The discount stays attached to the subscription till it is applied on an invoice **once** . It is removed after that from the subscription. \* limited_period - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period` and `period_unit`. + deprecated: false + default: forever + enum: + - one_time + - forever + - limited_period + percentage: + type: array + description: | + The percentage of the original amount that should be deducted from it. Only applicable when `discount.type` is percentage. + items: + maximum: 100 + minimum: 0.01 + type: number + format: double + deprecated: false + amount: + type: array + description: | + The value of the discount. [The format of this value](https://apidocs.chargebee.com/docs/api?prod_cat_ver=2#currencies) depends on the kind of currency. This is only applicable when `discount.type` is `fixed_amount`. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + period: + type: array + description: | + The duration of time for which the discount is attached to the subscription, in `period_units`. Applicable only when `duration_type` is `limited_period`. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + period_unit: + type: array + items: + type: string + description: | + The unit of time for `period`. Applicable only when `duration_type` is `limited_period`. \* day - A period of 24 hours. \* year - A period of 1 calendar year. \* week - A period of 7 days. \* month - A period of 1 calendar month. + deprecated: false + enum: + - day + - week + - month + - year + included_in_mrr: + type: array + description: | + The discount is included in MRR calculations for your site. This attribute is only applicable when `duration_type` is `one_time` and when the [feature is enabled](https://www.chargebee.com/docs/reporting.html#dashboards_flexible-mrr-calculation) in Chargebee. Also, If the [site-level setting](https://www.chargebee.com/docs/reporting.html#chart_flexible-mrr-calculation) is to exclude one-time discounts from MRR calculations, this value is always returned `false`. + items: + type: boolean + deprecated: false + item_price_id: + type: array + description: | + The [id of the item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) in the subscription to which the discount is to be applied. Relevant only when `apply_on` = `specific_item_price`. + items: + maxLength: 100 + type: string + deprecated: false + description: | + Parameters for discounts + deprecated: false + item_tiers: + type: object + properties: + item_price_id: + type: array + description: | + The id of the item price for which the tier price is being overridden. + items: + maxLength: 100 + type: string + deprecated: false + starting_unit: + type: array + description: | + The lowest value in the quantity tier. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + ending_unit: + type: array + description: | + The highest value in the quantity tier. + items: + type: integer + format: int32 + deprecated: false + price: + type: array + description: | + The overridden price of the tier. The value depends on the [type of currency](./#handling_currency_units). + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + default: 0 + starting_unit_in_decimal: + type: array + description: | + The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal` of the next lower tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + ending_unit_in_decimal: + type: array + description: | + The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal` of the next higher tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + price_in_decimal: + type: array + description: | + The decimal representation of the per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. When the `pricing_model` is `stairstep`, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: | + Parameters for item_tiers + deprecated: false + encoding: + contract_term: + style: deepObject + explode: true + discounts: + style: deepObject + explode: true + item_tiers: + style: deepObject + explode: true + shipping_address: + style: deepObject + explode: true + subscription: + style: deepObject + explode: true + subscription_items: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - quote + type: object + properties: + quote: + $ref: '#/components/schemas/Quote' + quoted_subscription: + $ref: '#/components/schemas/QuotedSubscription' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /quotes/{quote-id}: + get: + summary: Retrieve a quote + description: | + Retrieves the quotes identified by the 'number' specified in the url. + operationId: retrieve_a_quote + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-f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}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: quote-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - quote + type: object + properties: + quote: + $ref: '#/components/schemas/Quote' + quoted_subscription: + $ref: '#/components/schemas/QuotedSubscription' + quoted_charge: + $ref: '#/components/schemas/QuotedCharge' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /quotes/{quote-id}/edit_create_subscription_quote_for_items: + post: + summary: Edit a quote for subscription creation + description: | + Changes the quote produced for creating a new subscription items + operationId: edit_create_subscription_quote_for_items + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\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])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: quote-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + notes: + maxLength: 2000 + type: string + description: | + Notes specific to this quote that you want customers to see on the quote PDF. + deprecated: false + expires_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + Quotes will be valid till this date. After this quote will be marked as closed. + format: unix-time + deprecated: false + billing_cycles: + minimum: 0 + type: integer + description: | + The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles [set for the plan-item price](https://apidocs.chargebee.com/docs/api/item_prices?prod_cat_ver=2#item_price_billing_cycles) is used. + format: int32 + deprecated: false + mandatory_items_to_remove: + type: array + description: | + Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver=2) that are to be removed from the subscription. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + terms_to_charge: + minimum: 1 + type: integer + description: | + The number of subscription billing cycles (including the first one) to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html). + format: int32 + deprecated: false + billing_alignment_mode: + type: string + description: | + Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date) for Calendar Billing. Only applicable when using Calendar Billing. The default value is that which has been configured for the site. \* delayed - Subscription period will be aligned with the configured billing date at the next renewal. \* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly.. + deprecated: false + enum: + - immediate + - delayed + coupon_ids: + type: array + description: | + Identifier of the coupon as a List. Coupon Codes can also be passed. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + subscription: + type: object + properties: + id: + maxLength: 50 + type: string + description: | + A unique and immutable identifier for the subscription. If not provided, it is autogenerated. + deprecated: false + po_number: + maxLength: 100 + type: string + deprecated: false + trial_end: + pattern: "^[0-9]{10}$" + type: integer + description: | + End of the trial period for the subscription. This overrides the trial period set for the plan-item. The value must be later than `start_date`. Set it to `0` to have no trial period. + format: unix-time + deprecated: false + start_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The date/time at which the subscription is to start or has started. If not provided, the subscription starts immediately on quote conversion. The quote can be converted on a date/time after this date. This is called backdating the subscription creation and is done when the subscription has already been provisioned but the conversion action has been delayed. Backdating is allowed only when the following prerequisites are met: + + * Backdating is enabled for subscription creation operations. + * The current day of the month does not exceed the limit set in Chargebee for backdating such operations. This day is typically the day of the month by which the accounting for the previous month must be closed. + * The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the plan in the subscription is 2 months and today is 14th April, `subscription[start_date]` cannot be earlier than 14th February. + format: unix-time + deprecated: false + contract_term_billing_cycle_on_renewal: + maximum: 100 + minimum: 1 + type: integer + description: | + Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles` or a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms). + format: int32 + deprecated: false + description: | + Parameters for subscription + deprecated: false + shipping_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for shipping_address + deprecated: false + contract_term: + type: object + properties: + action_at_term_end: + type: string + description: |+ + Action to be taken when the contract term completes. \* evergreen - Contract term completes and the subscription renews. \* renew - + * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](subscriptions#create_subscription_for_customer_contract_term_billing_cycle_on_renewal). + * The `action_at_term_end` for the new contract term is set to `renew`. + \* cancel - Contract term completes and subscription is canceled. + + deprecated: false + enum: + - renew + - evergreen + - cancel + cancellation_cutoff_period: + type: integer + description: | + The number of days before [`contract_end`](contract_terms#contract_term_contract_end), during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure + format: int32 + deprecated: false + default: 0 + description: | + Parameters for contract_term + deprecated: false + subscription_items: + required: + - item_price_id + type: object + properties: + item_price_id: + type: array + description: | + The unique identifier of the item price. + items: + maxLength: 100 + type: string + deprecated: false + quantity: + type: array + description: | + The quantity of the item purchased + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + unit_price: + type: array + description: | + The price/per unit price of the item. When not provided, [the value set](/docs/api/item_prices?prod_cat_ver=2#item_price_attributes) for the item price is used. This is only applicable when the `pricing_model` of the item price is `flat_fee` or `per_unit`. Also, it is only allowed when [price overriding](https://www.chargebee.com/docs/price-override.html) is enabled for the site. The value depends on the type of currency. If `changes_scheduled_at` is in the past and a `unit_price` is not passed, then the item price's current unit price is considered even if the item price did not exist on the date as of when the change is scheduled. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + unit_price_in_decimal: + type: array + description: | + When [price overriding](https://www.chargebee.com/docs/2.0/price-override.html) is enabled for the site, the price or per-unit price of the item can be set here. The [value set for the item price](https://apidocs.chargebee.com/docs/api/item_prices#item_price_price) is used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + billing_cycles: + type: array + description: "For the plan-item price: \nthe value determines\ + \ the number of billing cycles the subscription runs before\ + \ canceling automatically. If not provided, then [the value\ + \ set](./item_prices?prod_cat_ver=2#item_price_attributes)\ + \ for the plan-item price is used. \n\nFor addon-item prices:\ + \ \nIf [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html)\ + \ are enabled then this is the number of subscription billing\ + \ cycles for which the addon is included. If not provided,\ + \ then [the value set under attached addons](./attached_items?prod_cat_ver=2#attached_item_attributes)\ + \ is used. Further, if that value is not provided, then [the\ + \ value set for the addon-item price](./item_prices?prod_cat_ver=2#item_price_attributes)\ + \ is used.\n" + items: + minimum: 0 + type: integer + format: int32 + deprecated: false + trial_end: + type: array + description: | + The date/time when the trial period of the item ends. Applies to plan-items and----when [enabled](https://www.chargebee.com/docs/2.0/addons-trial.html)----addon-items as well. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + service_period_days: + type: array + description: | + The service period of the item in days from the day of charge. + items: + maximum: 730 + minimum: 1 + type: integer + format: int32 + deprecated: false + charge_on_event: + type: array + items: + type: string + description: | + When `charge_on_option` option is set to `on_event`, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items. \* plan_activation - same as subscription activation, but also includes the case when the plan-item of the subscription is changed. \* subscription_activation - the moment a subscription enters an `active` or `non-renewing` state. Also includes reactivations of canceled subscriptions. \* contract_termination - when a contract term is [terminated](./subscriptions?prod_cat_ver=2#cancel_subscription_for_items_contract_term_cancel_option). \* subscription_trial_start - the time when the trial period of the subscription begins. \* subscription_creation - the time of creation of the subscription. + deprecated: false + enum: + - subscription_creation + - subscription_trial_start + - plan_activation + - subscription_activation + - contract_termination + charge_once: + type: array + description: | + Indicates if the charge-item is to be charged only once or each time the `charge_on_event` occurs. This parameter only applies to charge-items. + items: + type: boolean + deprecated: false + charge_on_option: + type: array + items: + type: string + description: | + Indicates when the charge-item is to be charged. This parameter only applies to charge-items. \* on_event - The item is charged at the occurrence of the event specified as `charge_on_event`. \* immediately - The item is charged immediately on being added to the subscription. + deprecated: false + enum: + - immediately + - on_event + description: | + Parameters for subscription_items + deprecated: false + discounts: + required: + - apply_on + - duration_type + type: object + properties: + apply_on: + type: array + items: + type: string + description: | + The amount on the quote to which the discount is applied. \* invoice_amount - The discount is applied to the invoice `sub_total`. \* specific_item_price - The discount is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id`. + deprecated: false + enum: + - invoice_amount + - specific_item_price + duration_type: + type: array + items: + type: string + description: | + Specifies the time duration for which this discount is attached to the subscription. \* forever - The discount is attached to the subscription and applied on the invoices till it is [explicitly removed](/docs/api/subscriptions?prod_cat_ver=2#update_subscription_for_items_discounts_operation_type). \* one_time - The discount stays attached to the subscription till it is applied on an invoice **once** . It is removed after that from the subscription. \* limited_period - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period` and `period_unit`. + deprecated: false + default: forever + enum: + - one_time + - forever + - limited_period + percentage: + type: array + description: | + The percentage of the original amount that should be deducted from it. Only applicable when `discount.type` is percentage. + items: + maximum: 100 + minimum: 0.01 + type: number + format: double + deprecated: false + amount: + type: array + description: | + The value of the discount. [The format of this value](https://apidocs.chargebee.com/docs/api?prod_cat_ver=2#currencies) depends on the kind of currency. This is only applicable when `discount.type` is `fixed_amount`. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + period: + type: array + description: | + The duration of time for which the discount is attached to the subscription, in `period_units`. Applicable only when `duration_type` is `limited_period`. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + period_unit: + type: array + items: + type: string + description: | + The unit of time for `period`. Applicable only when `duration_type` is `limited_period`. \* day - A period of 24 hours. \* year - A period of 1 calendar year. \* week - A period of 7 days. \* month - A period of 1 calendar month. + deprecated: false + enum: + - day + - week + - month + - year + included_in_mrr: + type: array + description: | + The discount is included in MRR calculations for your site. This attribute is only applicable when `duration_type` is `one_time` and when the [feature is enabled](https://www.chargebee.com/docs/reporting.html#dashboards_flexible-mrr-calculation) in Chargebee. Also, If the [site-level setting](https://www.chargebee.com/docs/reporting.html#chart_flexible-mrr-calculation) is to exclude one-time discounts from MRR calculations, this value is always returned `false`. + items: + type: boolean + deprecated: false + item_price_id: + type: array + description: | + The [id of the item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) in the subscription to which the discount is to be applied. Relevant only when `apply_on` = `specific_item_price`. + items: + maxLength: 100 + type: string + deprecated: false + description: | + Parameters for discounts + deprecated: false + item_tiers: + type: object + properties: + item_price_id: + type: array + description: | + The id of the item price for which the tier price is being overridden. + items: + maxLength: 100 + type: string + deprecated: false + starting_unit: + type: array + description: | + The lowest value in the quantity tier. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + ending_unit: + type: array + description: | + The highest value in the quantity tier. + items: + type: integer + format: int32 + deprecated: false + price: + type: array + description: | + The overridden price of the tier. The value depends on the [type of currency](./#handling_currency_units). + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + default: 0 + starting_unit_in_decimal: + type: array + description: | + The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal` of the next lower tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + ending_unit_in_decimal: + type: array + description: | + The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal` of the next higher tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + price_in_decimal: + type: array + description: | + The decimal representation of the per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. When the `pricing_model` is `stairstep`, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: | + Parameters for item_tiers + deprecated: false + encoding: + contract_term: + style: deepObject + explode: true + discounts: + style: deepObject + explode: true + item_tiers: + style: deepObject + explode: true + shipping_address: + style: deepObject + explode: true + subscription: + style: deepObject + explode: true + subscription_items: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - quote + type: object + properties: + quote: + $ref: '#/components/schemas/Quote' + quoted_subscription: + $ref: '#/components/schemas/QuotedSubscription' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /quotes/{quote-id}/update_status: + post: + summary: Update quote status + description: | + Updates the status of the quote. Status can be updated to Accepted, Declined, and Closed. + operationId: update_quote_status + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: quote-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - status + type: object + properties: + status: + type: string + description: | + Status to update for the quote. \* accepted - Accepted. \* closed - Closed \* declined - Declined. + deprecated: false + enum: + - accepted + - declined + - closed + comment: + maxLength: 300 + type: string + description: | + An internal [comment](./comments) to be added for this operation, to the quote. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing [Hosted Page](./hosted_pages) or any document such as the [Quote PDF](./quotes#retrieve_quote_as_pdf). + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - quote + type: object + properties: + quote: + $ref: '#/components/schemas/Quote' + quoted_subscription: + $ref: '#/components/schemas/QuotedSubscription' + quoted_charge: + $ref: '#/components/schemas/QuotedCharge' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /quotes/update_subscription_quote_for_items: + post: + summary: Create a quote for subscription update + description: | + Create a quote for updating subscription line items. + operationId: create_a_quote_for_update_subscription_items + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9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9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + name: + maxLength: 100 + type: string + description: | + The quote name will be used as the pdf name of the quote. + deprecated: false + notes: + maxLength: 2000 + type: string + description: | + Notes specific to this quote that you want customers to see on the quote PDF. + deprecated: false + expires_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + Quotes will be valid till this date. After this quote will be marked as closed. + format: unix-time + deprecated: false + mandatory_items_to_remove: + type: array + description: | + Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver=2) that are to be removed from the subscription. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + replace_items_list: + type: boolean + description: | + If `true` then the existing `subscription_items` list for the subscription is replaced by the one provided. If `false` then the provided `subscription_items` list gets added to the existing list. + deprecated: false + default: false + billing_cycles: + minimum: 0 + type: integer + description: | + Billing cycles set for plan-item price is used by default. + format: int32 + deprecated: false + terms_to_charge: + minimum: 1 + type: integer + description: | + The number of subscription billing cycles to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html). If a new term is started for the subscription due to this API call, then `terms_to_charge` is inclusive of this new term. See description for the `force_term_reset` parameter to learn more about when a subscription term is reset. + format: int32 + deprecated: false + reactivate_from: + pattern: "^[0-9]{10}$" + type: integer + description: "If the subscription `status` is `cancelled` and it\ + \ is being reactivated via this operation, this is the date/time\ + \ at which the subscription should be reactivated. \n**Note:**\ + \ It is recommended not to pass this parameter along with `changed_scheduled_at`.\ + \ `reactivate_from` can be backdated (set to a value in the past).\ + \ Use backdating when the subscription has been reactivated already\ + \ but its billing has been delayed. Backdating is allowed only\ + \ when the following prerequisites are met:\n\n* Backdating must\ + \ be enabled for subscription reactivation operations.\n* The\ + \ current day of the month does not exceed the limit set in Chargebee\ + \ for backdating subscription change. This limit is the day of\ + \ the month by which the accounting for the previous month must\ + \ be closed.\n* The date is on or after the last date/time any\ + \ of the product catalog items of the subscription were changed.\n\ + * The date is not more than duration X into the past where X is\ + \ the billing period of the plan. For example, if the period of\ + \ the plan in the subscription is 2 months and today is 14th April,\ + \ `changes_scheduled_at` cannot be earlier than 14th February.\n\ + .\n" + format: unix-time + deprecated: false + billing_alignment_mode: + type: string + description: | + Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date) chosen for the site for calendar billing. Only applicable when using calendar billing. \* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly.. \* delayed - Subscription period will be aligned with the configured billing date at the next renewal. + deprecated: false + enum: + - immediate + - delayed + coupon_ids: + type: array + description: | + Identifier of the coupon as a List. Coupon Codes can also be passed. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + replace_coupon_list: + type: boolean + description: | + Should be true if the existing coupons should be replaced with the ones that are being passed. + deprecated: false + default: false + change_option: + type: string + description: | + When the quote is converted, this attribute determines the date/time as of when the subscription change is to be carried out. \* end_of_term - The change is carried out at the end of the current billing cycle of the subscription. \* specific_date - The change is carried out as of the date specified under `changes_scheduled_at`. \* immediately - The change is carried out immediately. + deprecated: false + enum: + - immediately + - specific_date + changes_scheduled_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + When `change_option` is set to `specific_date`, then set the date/time at which the subscription change is to happen or has happened. `changes_scheduled_at` can be set to a value in the past. This is called backdating the subscription change and is performed when the subscription change has already been provisioned but its billing has been delayed. Backdating is allowed only when the following prerequisites are met: + + * Backdating must be enabled for subscription change operations. + * Only the following changes can be backdated: + * Changes in the recurring items or their prices. + * Addition of non-recurring items. + * Subscription `status` is `active`, `cancelled`, or `non_renewing`. + * The current day of the month does not exceed the limit set in Chargebee for backdating subscription change. This limit is the day of the month by which the accounting for the previous month must be closed. + * The date is on or after `current_term_start`. + * The date is on or after the last date/time any of the following changes were made: + * Changes in the recurring items or their prices. + * Addition of non-recurring items. + * The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the subscription's plan is 2 months and today is 14th April, `changes_scheduled_at` cannot be earlier than 14th February. + . + format: unix-time + deprecated: false + force_term_reset: + type: boolean + description: "Applicable for 'Active' \\& 'Non Renewing' states\ + \ alone. Generally, subscription's term will be reset (i.e current\ + \ term is ended and a new term starts immediately) when a new\ + \ plan having different billing frequency is specified in the\ + \ input. For all the other cases, the subscription's term will\ + \ remain intact. Now for this later scenario, if you want to force\ + \ a term reset you can specify this param as 'true'. \n**Note**:\ + \ Specifying this value as 'false' has no impact on the default\ + \ behaviour.\n" + deprecated: false + default: false + reactivate: + type: boolean + description: | + Applicable only for cancelled subscriptions. Once this is passed as true, cancelled subscription will become active; otherwise subscription changes will be made but the subscription state will remain cancelled. If not passed, subscription will be activated only if there is any change in subscription data. + deprecated: false + subscription: + required: + - id + type: object + properties: + id: + maxLength: 50 + type: string + description: | + A unique and immutable identifier for the subscription. If not provided, it is autogenerated. + deprecated: false + start_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The new start date of a `future` subscription. Applicable only for `future` subscriptions. + format: unix-time + deprecated: false + trial_end: + pattern: "^[0-9]{10}$" + type: integer + description: | + The time at which the trial has ended or will end for the subscription. This is only allowed when the subscription `status` is `future`, `in_trial`, or `cancelled`. Also, the value must not be earlier than `changes_scheduled_at` or `start_date`. **Note** : This parameter can be backdated (set to a value in the past) only when the subscription is in `cancelled` or `in_trial` `status`. Do this to keep a record of when the trial ended in case it ended at some point in the past. When `trial_end` is backdated, the subscription immediately goes into `active` or `non_renewing` status. + format: unix-time + deprecated: false + auto_collection: + type: string + description: | + Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property. \* off - Automatic collection of charges will not be made for this subscription. Use this for offline payments. \* on - Whenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available. + deprecated: false + enum: + - "on" + - "off" + offline_payment_method: + type: string + description: | + The preferred offline payment method for the subscription. \* uk_automated_bank_transfer - UK Automated Bank Transfer \* jp_automated_bank_transfer - JP Automated Bank Transfer \* bank_transfer - Bank Transfer \* us_automated_bank_transfer - US Automated Bank Transfer \* boleto - Boleto \* no_preference - No Preference \* sepa_credit - SEPA Credit \* mx_automated_bank_transfer - MX Automated Bank Transfer \* ach_credit - ACH Credit \* custom - Custom \* eu_automated_bank_transfer - EU Automated Bank Transfer \* cash - Cash \* check - Check + deprecated: false + enum: + - no_preference + - cash + - check + - bank_transfer + - ach_credit + - sepa_credit + - boleto + - us_automated_bank_transfer + - eu_automated_bank_transfer + - uk_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + - custom + contract_term_billing_cycle_on_renewal: + maximum: 100 + minimum: 1 + type: integer + description: | + Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles` or a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms). + format: int32 + deprecated: false + description: | + Parameters for subscription + deprecated: false + billing_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the billing contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the billing contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for billing_address + deprecated: false + shipping_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for shipping_address + deprecated: false + customer: + type: object + properties: + vat_number: + maxLength: 20 + type: string + description: | + VAT number of this customer. If not provided then taxes are not calculated for the estimate. Applicable only when taxes are configured for the EU or UK region. VAT validation is not done for this. + deprecated: false + vat_number_prefix: + maxLength: 10 + type: string + description: "An overridden value for the first two characters\ + \ of the [full VAT\nnumber](https://en.wikipedia.org/wiki/VAT_identification_number).\ + \ Only applicable specifically for customers with [billing_address](customers#customer_billing_address)\ + \ `country` as `XI` (which is **United Kingdom - Northern\ + \ Ireland** ). \n\nWhen you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or have [manually\nenabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, you have the option of setting\ + \ [billing_address](customers#customer_billing_address) `country`\ + \ as `XI`. That's the code for **United Kingdom - Northern\n\ + Ireland** . The first two characters of the VAT number in\ + \ such a case is `XI` by default. However, if the VAT number\ + \ was registered in UK, the value should be `GB`. Set `vat_number_prefix`\ + \ to `GB` for such cases.\n" + deprecated: false + registered_for_gst: + type: boolean + description: | + Confirms that a customer is registered under GST. If set to `true` then the [Reverse Charge Mechanism](https://www.chargebee.com/docs/australian-gst.html#reverse-charge-mechanism) is applicable. This field is applicable only when Australian GST is configured for your site. + deprecated: false + description: | + Parameters for customer + deprecated: false + contract_term: + type: object + properties: + action_at_term_end: + type: string + description: |+ + Action to be taken when the contract term completes. \* evergreen - Contract term completes and the subscription renews. \* renew - + * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](subscriptions#create_subscription_for_customer_contract_term_billing_cycle_on_renewal). + * The `action_at_term_end` for the new contract term is set to `renew`. + \* renew_once - Used when you want to renew the contract term just once. Does the following: + * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](subscriptions#create_subscription_for_customer_contract_term_billing_cycle_on_renewal). + * The `action_at_term_end` for the new contract term is set to `cancel`. + \* cancel - Contract term completes and subscription is canceled. + + deprecated: false + default: renew + enum: + - renew + - evergreen + - cancel + - renew_once + cancellation_cutoff_period: + type: integer + description: | + The number of days before [`contract_end`](contract_terms#contract_term_contract_end), during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure + format: int32 + deprecated: false + description: | + Parameters for contract_term + deprecated: false + subscription_items: + required: + - item_price_id + type: object + properties: + item_price_id: + type: array + description: | + The unique identifier of the item price. + items: + maxLength: 100 + type: string + deprecated: false + quantity: + type: array + description: | + The quantity of the item purchased + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + unit_price: + type: array + description: | + The price/per unit price of the item. When not provided, [the value set](/docs/api/item_prices?prod_cat_ver=2#item_price_attributes) for the item price is used. This is only applicable when the `pricing_model` of the item price is `flat_fee` or `per_unit`. Also, it is only allowed when [price overriding](https://www.chargebee.com/docs/price-override.html) is enabled for the site. The value depends on the type of currency. If `changes_scheduled_at` is in the past and a `unit_price` is not passed, then the item price's current unit price is considered even if the item price did not exist on the date as of when the change is scheduled. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + unit_price_in_decimal: + type: array + description: | + When [price overriding](https://www.chargebee.com/docs/price-override.html) is enabled for the site, the price or per-unit price of the item can be set here. The [value set for the item price](/docs/api/item_prices#item_price_price) is used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api#handling_currency_units) is enabled. If `changes_scheduled_at` is in the past and a `unit_price_in_decimal` is not passed, then the item price's current unit price is considered even if the item price did not exist on the date as of when the change is scheduled. + items: + maxLength: 39 + type: string + deprecated: false + billing_cycles: + type: array + description: "For the plan-item price: \nthe value determines\ + \ the number of billing cycles the subscription runs before\ + \ canceling automatically. If not provided, then [the value\ + \ set](./item_prices?prod_cat_ver=2#item_price_attributes)\ + \ for the plan-item price is used. \n\nFor addon-item prices:\ + \ \nIf [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html)\ + \ are enabled then this is the number of subscription billing\ + \ cycles for which the addon is included. If not provided,\ + \ then [the value set under attached addons](./attached_items?prod_cat_ver=2#attached_item_attributes)\ + \ is used. Further, if that value is not provided, then [the\ + \ value set for the addon-item price](./item_prices?prod_cat_ver=2#item_price_attributes)\ + \ is used.\n" + items: + minimum: 0 + type: integer + format: int32 + deprecated: false + trial_end: + type: array + description: | + The date/time when the trial period of the item ends. Applies to plan-items and----when [enabled](https://www.chargebee.com/docs/2.0/addons-trial.html)----addon-items as well. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + service_period_days: + type: array + description: | + The service period of the item in days from the day of charge. + items: + maximum: 730 + minimum: 1 + type: integer + format: int32 + deprecated: false + charge_on_event: + type: array + items: + type: string + description: | + When `charge_on_option` option is set to `on_event`, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items. \* contract_termination - when a contract term is [terminated](./subscriptions?prod_cat_ver=2#cancel_subscription_for_items_contract_term_cancel_option). \* subscription_trial_start - the time when the trial period of the subscription begins. \* plan_activation - same as subscription activation, but also includes the case when the plan-item of the subscription is changed. \* subscription_activation - the moment a subscription enters an `active` or `non-renewing` state. Also includes reactivations of canceled subscriptions. \* subscription_creation - the time of creation of the subscription. + deprecated: false + enum: + - subscription_creation + - subscription_trial_start + - plan_activation + - subscription_activation + - contract_termination + charge_once: + type: array + description: | + Indicates if the charge-item is to be charged only once or each time the `charge_on_event` occurs. This parameter only applies to charge-items. + items: + type: boolean + deprecated: false + charge_on_option: + type: array + items: + type: string + description: | + Indicates when the charge-item is to be charged. This parameter only applies to charge-items. \* on_event - The item is charged at the occurrence of the event specified as `charge_on_event`. \* immediately - The item is charged immediately on being added to the subscription. + deprecated: false + enum: + - immediately + - on_event + description: | + Parameters for subscription_items + deprecated: false + discounts: + required: + - apply_on + - duration_type + - operation_type + type: object + properties: + apply_on: + type: array + items: + type: string + description: | + The amount on the quote to which the discount is applied. \* invoice_amount - The discount is applied to the invoice `sub_total`. \* specific_item_price - The discount is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id`. + deprecated: false + enum: + - invoice_amount + - specific_item_price + duration_type: + type: array + items: + type: string + description: | + Specifies the time duration for which this discount is attached to the subscription. \* forever - The discount is attached to the subscription and applied on the invoices till it is [explicitly removed](/docs/api/subscriptions?prod_cat_ver=2#update_subscription_for_items_discounts_operation_type). \* limited_period - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period` and `period_unit`. \* one_time - The discount stays attached to the subscription till it is applied on an invoice **once**. It is removed after that from the subscription. + deprecated: false + default: forever + enum: + - one_time + - forever + - limited_period + percentage: + type: array + description: | + The percentage of the original amount that should be deducted from it. Only applicable when `discount.type` is percentage. + items: + maximum: 100 + minimum: 0.01 + type: number + format: double + deprecated: false + amount: + type: array + description: | + The value of the discount. [The format of this value](https://apidocs.chargebee.com/docs/api?prod_cat_ver=2#currencies) depends on the kind of currency. This is only applicable when `discount.type` is `fixed_amount`. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + period: + type: array + description: | + The duration of time for which the discount is attached to the subscription, in `period_units`. Applicable only when `duration_type` is `limited_period`. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + period_unit: + type: array + items: + type: string + description: | + The unit of time for `period`. Applicable only when `duration_type` is `limited_period`. \* day - A period of 24 hours. \* week - A period of 7 days. \* month - A period of 1 calendar month. \* year - A period of 1 calendar year. + deprecated: false + enum: + - day + - week + - month + - year + included_in_mrr: + type: array + description: | + The discount is included in MRR calculations for your site. This attribute is only applicable when `duration_type` is `one_time` and when the [feature is enabled](https://www.chargebee.com/docs/reporting.html#dashboards_flexible-mrr-calculation) in Chargebee. Also, If the [site-level setting](https://www.chargebee.com/docs/reporting.html#chart_flexible-mrr-calculation) is to exclude one-time discounts from MRR calculations, this value is always returned `false`. + items: + type: boolean + deprecated: false + item_price_id: + type: array + description: | + The [id of the item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) in the subscription to which the discount is to be applied. Relevant only when `apply_on` = `specific_item_price`. + items: + maxLength: 100 + type: string + deprecated: false + operation_type: + type: array + items: + type: string + description: | + The operation to be carried out for the discount. \* add - The discount is attached to the subscription. \* remove - The discount (given by `discounts[id]`) is removed from the subscription. Subsequent invoices will no longer have the discount applied. **Tip:** If you want to replace a discount, `remove` it and `add` another in the same API call. + deprecated: false + enum: + - add + - remove + id: + type: array + description: | + The `id` of the discount to be removed or updated. This parameter is only relevant when `discounts[operation_type]` is `remove` or `update`. + items: + maxLength: 50 + type: string + deprecated: false + description: | + Parameters for discounts + deprecated: false + item_tiers: + type: object + properties: + item_price_id: + type: array + description: | + The id of the item price for which the tier price is being overridden. + items: + maxLength: 100 + type: string + deprecated: false + starting_unit: + type: array + description: | + The lowest value in the quantity tier. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + ending_unit: + type: array + description: | + The highest value in the quantity tier. + items: + type: integer + format: int32 + deprecated: false + price: + type: array + description: | + The overridden price of the tier. The value depends on the [type of currency](./#handling_currency_units). + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + default: 0 + starting_unit_in_decimal: + type: array + description: | + The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal` of the next lower tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + ending_unit_in_decimal: + type: array + description: | + The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal` of the next higher tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + price_in_decimal: + type: array + description: | + The decimal representation of the per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. When the `pricing_model` is `stairstep`, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: | + Parameters for item_tiers + deprecated: false + encoding: + billing_address: + style: deepObject + explode: true + contract_term: + style: deepObject + explode: true + customer: + style: deepObject + explode: true + discounts: + style: deepObject + explode: true + item_tiers: + style: deepObject + explode: true + shipping_address: + style: deepObject + explode: true + subscription: + style: deepObject + explode: true + subscription_items: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - quote + type: object + properties: + quote: + $ref: '#/components/schemas/Quote' + quoted_subscription: + $ref: '#/components/schemas/QuotedSubscription' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /quotes/{quote-id}/quote_line_groups: + get: + summary: List quote line groups + description: | + This API retrieves all the quote line groups and lineitems for a quote. + operationId: list_quote_line_groups + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][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:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: quote-id + in: path + required: true + style: simple + explode: false + schema: + type: string + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - quote_line_group + type: object + properties: + quote_line_group: + $ref: '#/components/schemas/QuoteLineGroup' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /quotes/{quote-id}/extend_expiry_date: + post: + summary: Extend expiry date + description: | + Can be used to extend the expiry date of a quote. + operationId: extend_expiry_date + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?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0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: quote-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - valid_till + type: object + properties: + valid_till: + pattern: "^[0-9]{10}$" + type: integer + description: | + Quote will be valid till this date. After this date quote will be marked as closed. + format: unix-time + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - quote + type: object + properties: + quote: + $ref: '#/components/schemas/Quote' + quoted_subscription: + $ref: '#/components/schemas/QuotedSubscription' + quoted_charge: + $ref: '#/components/schemas/QuotedCharge' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /quotes/{quote-id}/edit_for_charge_items_and_charges: + post: + summary: Edit a quote for charges and charge items + description: | + Changes the quote produced for adding one-time charges and charge items. + operationId: edit_quote_for_charge_items_and_charges + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$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?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: quote-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + po_number: + maxLength: 100 + type: string + description: | + Purchase Order Number for this quote. + deprecated: false + notes: + maxLength: 2000 + type: string + description: | + Notes specific to this quote that you want customers to see on the quote PDF. + deprecated: false + expires_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + Quotes will be valid till this date. After this quote will be marked as closed. + format: unix-time + deprecated: false + currency_code: + maxLength: 3 + type: string + description: | + The currency code (ISO 4217 format) of the quote. + deprecated: false + coupon: + maxLength: 100 + type: string + description: | + The 'One Time' coupon to be applied. + deprecated: false + coupon_ids: + type: array + description: | + List of Coupons to be added. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + shipping_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for shipping_address + deprecated: false + item_prices: + type: object + properties: + item_price_id: + type: array + description: | + A unique ID for your system to identify the item price. + items: + maxLength: 100 + type: string + deprecated: false + quantity: + type: array + description: | + Item price quantity + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + unit_price: + type: array + description: | + The price or per-unit-price of the item price. By default, it is the [value set](/docs/api/item_prices#item_price_price) for the `item_price`. This is only applicable when the `pricing_model` of the `item_price` is `flat_fee` or `per_unit`. The value depends on the [type of currency](/docs/api/#handling_currency_units). + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + unit_price_in_decimal: + type: array + description: | + The decimal representation of the price or per-unit price of the plan. The value is in major units of the currency. Always returned when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + service_period_days: + type: array + description: | + Defines service period of the item in days from the day of charge. + items: + maximum: 730 + minimum: 1 + type: integer + format: int32 + deprecated: false + description: | + Parameters for item_prices + deprecated: false + item_tiers: + type: object + properties: + item_price_id: + type: array + description: | + The id of the item price to which this tier belongs. + items: + maxLength: 100 + type: string + deprecated: false + starting_unit: + type: array + description: | + The lowest value in the quantity tier. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + ending_unit: + type: array + description: | + The highest value in the quantity tier. + items: + type: integer + format: int32 + deprecated: false + price: + type: array + description: | + The per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. The total cost for the item price when the `pricing_model` is `stairstep`. The value is in the minor unit of the currency. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + default: 0 + starting_unit_in_decimal: + type: array + description: | + The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal` of the next lower tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + ending_unit_in_decimal: + type: array + description: | + The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal` of the next higher tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + price_in_decimal: + type: array + description: | + The decimal representation of the per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. When the `pricing_model` is `stairstep`, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: | + Parameters for item_tiers + deprecated: false + charges: + type: object + properties: + amount: + type: array + description: | + The amount to be charged. The unit depends on the [type of currency](/docs/api?prod_cat_ver=1#md_disabled). + items: + minimum: 1 + type: integer + format: int64 + deprecated: false + amount_in_decimal: + type: array + description: | + The decimal representation of the amount for the one-time charge. The value is in [major units of the currency](/docs/api#md_enabled). Applicable only when multi-decimal pricing is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: + type: array + description: | + Description for this charge + items: + maxLength: 250 + type: string + deprecated: false + avalara_sale_type: + type: array + items: + type: string + description: | + Indicates the type of sale carried out. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. \* consumed - Transaction is for an item that is consumed directly \* vendor_use - Transaction is for an item that is subject to vendor use tax \* wholesale - Transaction is a sale to another company that will resell your product or service to another consumer \* retail - Transaction is a sale to an end user + deprecated: false + enum: + - wholesale + - retail + - consumed + - vendor_use + avalara_transaction_type: + type: array + description: | + Indicates the type of product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. + items: + type: integer + format: int32 + deprecated: false + avalara_service_type: + type: array + description: | + Indicates the type of service for the product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. + items: + type: integer + format: int32 + deprecated: false + service_period: + type: array + description: | + Service period for charge + items: + type: integer + format: int32 + deprecated: false + description: | + Parameters for charges + deprecated: false + discounts: + required: + - apply_on + type: object + properties: + percentage: + type: array + description: | + The percentage of the original amount that should be deducted from it. Only applicable when `discount.type` is percentage. + items: + maximum: 100 + minimum: 0.01 + type: number + format: double + deprecated: false + amount: + type: array + description: | + The value of the discount. [The format of this value](https://apidocs.chargebee.com/docs/api?prod_cat_ver=2#currencies) depends on the kind of currency. This is only applicable when `discount.type` is `fixed_amount`. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + apply_on: + type: array + items: + type: string + description: | + The amount on the quote to which the discount is applied. \* invoice_amount - The discount is applied to the invoice `sub_total`. \* specific_item_price - The discount is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id`. + deprecated: false + enum: + - invoice_amount + - specific_item_price + item_price_id: + type: array + description: | + The [id of the item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) in the subscription to which the discount is to be applied. Relevant only when `apply_on` = `specific_item_price`. + items: + maxLength: 100 + type: string + deprecated: false + description: | + Parameters for discounts + deprecated: false + tax_providers_fields: + type: object + properties: + provider_name: + type: array + items: + maxLength: 50 + type: string + deprecated: false + field_id: + type: array + items: + maxLength: 50 + type: string + deprecated: false + field_value: + type: array + items: + maxLength: 50 + type: string + deprecated: false + description: | + Parameters for tax_providers_fields + deprecated: false + encoding: + charges: + style: deepObject + explode: true + discounts: + style: deepObject + explode: true + item_prices: + style: deepObject + explode: true + item_tiers: + style: deepObject + explode: true + shipping_address: + style: deepObject + explode: true + tax_providers_fields: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - quote + type: object + properties: + quote: + $ref: '#/components/schemas/Quote' + quoted_charge: + $ref: '#/components/schemas/QuotedCharge' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /quotes/{quote-id}/edit_update_subscription_quote_for_items: + post: + summary: Edit a quote for subscription update + description: | + Changes the quote produced for updating the subscription items. + operationId: edit_update_subscription_quote_for_items + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|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-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: quote-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + notes: + maxLength: 2000 + type: string + description: | + Notes specific to this quote that you want customers to see on the quote PDF. + deprecated: false + expires_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + Quotes will be valid till this date. After this quote will be marked as closed. + format: unix-time + deprecated: false + mandatory_items_to_remove: + type: array + description: | + Item ids of [mandatorily attached addons](./attached_items?prod_cat_ver=2) that are to be removed from the subscription. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + replace_items_list: + type: boolean + description: | + If `true` then the existing `subscription_items` list for the subscription is replaced by the one provided. If `false` then the provided `subscription_items` list gets added to the existing list. + deprecated: false + default: false + billing_cycles: + minimum: 0 + type: integer + description: | + Billing cycles set for plan-item price is used by default. + format: int32 + deprecated: false + terms_to_charge: + minimum: 1 + type: integer + description: | + The number of subscription billing cycles to [invoice in advance](https://www.chargebee.com/docs/advance-invoices.html). If a new term is started for the subscription due to this API call, then `terms_to_charge` is inclusive of this new term. See description for the `force_term_reset` parameter to learn more about when a subscription term is reset. + format: int32 + deprecated: false + reactivate_from: + pattern: "^[0-9]{10}$" + type: integer + description: "If the subscription `status` is `cancelled` and it\ + \ is being reactivated via this operation, this is the date/time\ + \ at which the subscription should be reactivated. \n**Note:**\ + \ It is recommended not to pass this parameter along with `changed_scheduled_at`.\ + \ `reactivate_from` can be backdated (set to a value in the past).\ + \ Use backdating when the subscription has been reactivated already\ + \ but its billing has been delayed. Backdating is allowed only\ + \ when the following prerequisites are met:\n\n* Backdating must\ + \ be enabled for subscription reactivation operations.\n* The\ + \ current day of the month does not exceed the limit set in Chargebee\ + \ for backdating subscription change. This limit is the day of\ + \ the month by which the accounting for the previous month must\ + \ be closed.\n* The date is on or after the last date/time any\ + \ of the product catalog items of the subscription were changed.\n\ + * The date is not more than duration X into the past where X is\ + \ the billing period of the plan. For example, if the period of\ + \ the plan in the subscription is 2 months and today is 14th April,\ + \ `changes_scheduled_at` cannot be earlier than 14th February.\n\ + .\n" + format: unix-time + deprecated: false + billing_alignment_mode: + type: string + description: | + Override the [billing alignment mode](https://www.chargebee.com/docs/calendar-billing.html#alignment-of-billing-date) chosen for the site for calendar billing. Only applicable when using calendar billing. \* immediate - Subscription period will be aligned with the configured billing date immediately, with credits or charges raised accordingly.. \* delayed - Subscription period will be aligned with the configured billing date at the next renewal. + deprecated: false + enum: + - immediate + - delayed + coupon_ids: + type: array + description: | + Identifier of the coupon as a List. Coupon Codes can also be passed. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + replace_coupon_list: + type: boolean + description: | + Should be true if the existing coupons should be replaced with the ones that are being passed. + deprecated: false + default: false + change_option: + type: string + description: | + When the quote is converted, this attribute determines the date/time as of when the subscription change is to be carried out. \* end_of_term - The change is carried out at the end of the current billing cycle of the subscription. \* specific_date - The change is carried out as of the date specified under `changes_scheduled_at`. \* immediately - The change is carried out immediately. + deprecated: false + enum: + - immediately + - specific_date + changes_scheduled_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + When `change_option` is set to `specific_date`, then set the date/time at which the subscription change is to happen or has happened. `changes_scheduled_at` can be set to a value in the past. This is called backdating the subscription change and is performed when the subscription change has already been provisioned but its billing has been delayed. Backdating is allowed only when the following prerequisites are met: + + * Backdating must be enabled for subscription change operations. + * Only the following changes can be backdated: + * Changes in the recurring items or their prices. + * Addition of non-recurring items. + * Subscription `status` is `active`, `cancelled`, or `non_renewing`. + * The current day of the month does not exceed the limit set in Chargebee for backdating subscription change. This limit is the day of the month by which the accounting for the previous month must be closed. + * The date is on or after `current_term_start`. + * The date is on or after the last date/time any of the following changes were made: + * Changes in the recurring items or their prices. + * Addition of non-recurring items. + * The date is not more than duration X into the past where X is the billing period of the plan. For example, if the period of the subscription's plan is 2 months and today is 14th April, `changes_scheduled_at` cannot be earlier than 14th February. + . + format: unix-time + deprecated: false + force_term_reset: + type: boolean + description: "Applicable for 'Active' \\& 'Non Renewing' states\ + \ alone. Generally, subscription's term will be reset (i.e current\ + \ term is ended and a new term starts immediately) when a new\ + \ plan having different billing frequency is specified in the\ + \ input. For all the other cases, the subscription's term will\ + \ remain intact. Now for this later scenario, if you want to force\ + \ a term reset you can specify this param as 'true'. \n**Note**:\ + \ Specifying this value as 'false' has no impact on the default\ + \ behaviour.\n" + deprecated: false + default: false + reactivate: + type: boolean + description: | + Applicable only for cancelled subscriptions. Once this is passed as true, cancelled subscription will become active; otherwise subscription changes will be made but the subscription state will remain cancelled. If not passed, subscription will be activated only if there is any change in subscription data. + deprecated: false + subscription: + type: object + properties: + start_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The new start date of a `future` subscription. Applicable only for `future` subscriptions. + format: unix-time + deprecated: false + trial_end: + pattern: "^[0-9]{10}$" + type: integer + description: | + The time at which the trial has ended or will end for the subscription. This is only allowed when the subscription `status` is `future`, `in_trial`, or `cancelled`. Also, the value must not be earlier than `changes_scheduled_at` or `start_date`. **Note** : This parameter can be backdated (set to a value in the past) only when the subscription is in `cancelled` or `in_trial` `status`. Do this to keep a record of when the trial ended in case it ended at some point in the past. When `trial_end` is backdated, the subscription immediately goes into `active` or `non_renewing` status. + format: unix-time + deprecated: false + auto_collection: + type: string + description: | + Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property. \* off - Automatic collection of charges will not be made for this subscription. Use this for offline payments. \* on - Whenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available. + deprecated: false + enum: + - "on" + - "off" + offline_payment_method: + type: string + description: | + The preferred offline payment method for the subscription. \* uk_automated_bank_transfer - UK Automated Bank Transfer \* jp_automated_bank_transfer - JP Automated Bank Transfer \* bank_transfer - Bank Transfer \* us_automated_bank_transfer - US Automated Bank Transfer \* boleto - Boleto \* no_preference - No Preference \* sepa_credit - SEPA Credit \* mx_automated_bank_transfer - MX Automated Bank Transfer \* ach_credit - ACH Credit \* custom - Custom \* eu_automated_bank_transfer - EU Automated Bank Transfer \* cash - Cash \* check - Check + deprecated: false + enum: + - no_preference + - cash + - check + - bank_transfer + - ach_credit + - sepa_credit + - boleto + - us_automated_bank_transfer + - eu_automated_bank_transfer + - uk_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + - custom + contract_term_billing_cycle_on_renewal: + maximum: 100 + minimum: 1 + type: integer + description: | + Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as `billing_cycles` or a custom value depending on the [site configuration](https://www.chargebee.com/docs/contract-terms.html#configuring-contract-terms). + format: int32 + deprecated: false + description: | + Parameters for subscription + deprecated: false + billing_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the billing contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the billing contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* valid - Address was validated successfully. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for billing_address + deprecated: false + shipping_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for shipping_address + deprecated: false + customer: + type: object + properties: + vat_number: + maxLength: 20 + type: string + description: | + VAT number of this customer. If not provided then taxes are not calculated for the estimate. Applicable only when taxes are configured for the EU or UK region. VAT validation is not done for this. + deprecated: false + vat_number_prefix: + maxLength: 10 + type: string + description: "An overridden value for the first two characters\ + \ of the [full VAT\nnumber](https://en.wikipedia.org/wiki/VAT_identification_number).\ + \ Only applicable specifically for customers with [billing_address](customers#customer_billing_address)\ + \ `country` as `XI` (which is **United Kingdom - Northern\ + \ Ireland** ). \n\nWhen you have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or have [manually\nenabled](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, you have the option of setting\ + \ [billing_address](customers#customer_billing_address) `country`\ + \ as `XI`. That's the code for **United Kingdom - Northern\n\ + Ireland** . The first two characters of the VAT number in\ + \ such a case is `XI` by default. However, if the VAT number\ + \ was registered in UK, the value should be `GB`. Set `vat_number_prefix`\ + \ to `GB` for such cases.\n" + deprecated: false + registered_for_gst: + type: boolean + description: | + Confirms that a customer is registered under GST. If set to `true` then the [Reverse Charge Mechanism](https://www.chargebee.com/docs/australian-gst.html#reverse-charge-mechanism) is applicable. This field is applicable only when Australian GST is configured for your site. + deprecated: false + description: | + Parameters for customer + deprecated: false + contract_term: + type: object + properties: + action_at_term_end: + type: string + description: |+ + Action to be taken when the contract term completes. \* evergreen - Contract term completes and the subscription renews. \* renew - + * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](subscriptions#create_subscription_for_customer_contract_term_billing_cycle_on_renewal). + * The `action_at_term_end` for the new contract term is set to `renew`. + \* renew_once - Used when you want to renew the contract term just once. Does the following: + * Contract term completes and a new contract term is started for the number of billing cycles specified in [`contract_billing_cycle_on_renewal`](subscriptions#create_subscription_for_customer_contract_term_billing_cycle_on_renewal). + * The `action_at_term_end` for the new contract term is set to `cancel`. + \* cancel - Contract term completes and subscription is canceled. + + deprecated: false + default: renew + enum: + - renew + - evergreen + - cancel + - renew_once + cancellation_cutoff_period: + type: integer + description: | + The number of days before [`contract_end`](contract_terms#contract_term_contract_end), during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing the contract term closure + format: int32 + deprecated: false + description: | + Parameters for contract_term + deprecated: false + subscription_items: + required: + - item_price_id + type: object + properties: + item_price_id: + type: array + description: | + The unique identifier of the item price. + items: + maxLength: 100 + type: string + deprecated: false + quantity: + type: array + description: | + The quantity of the item purchased + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + unit_price: + type: array + description: | + The price/per unit price of the item. When not provided, [the value set](/docs/api/item_prices?prod_cat_ver=2#item_price_attributes) for the item price is used. This is only applicable when the `pricing_model` of the item price is `flat_fee` or `per_unit`. Also, it is only allowed when [price overriding](https://www.chargebee.com/docs/price-override.html) is enabled for the site. The value depends on the type of currency. If `changes_scheduled_at` is in the past and a `unit_price` is not passed, then the item price's current unit price is considered even if the item price did not exist on the date as of when the change is scheduled. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + unit_price_in_decimal: + type: array + description: | + When [price overriding](https://www.chargebee.com/docs/price-override.html) is enabled for the site, the price or per-unit price of the item can be set here. The [value set for the item price](/docs/api/item_prices#item_price_price) is used by default. Provide the value as a decimal string in major units of the currency. Can be provided only when [multi-decimal pricing](/docs/api#handling_currency_units) is enabled. If `changes_scheduled_at` is in the past and a `unit_price_in_decimal` is not passed, then the item price's current unit price is considered even if the item price did not exist on the date as of when the change is scheduled. + items: + maxLength: 39 + type: string + deprecated: false + billing_cycles: + type: array + description: "For the plan-item price: \nthe value determines\ + \ the number of billing cycles the subscription runs before\ + \ canceling automatically. If not provided, then [the value\ + \ set](./item_prices?prod_cat_ver=2#item_price_attributes)\ + \ for the plan-item price is used. \n\nFor addon-item prices:\ + \ \nIf [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html)\ + \ are enabled then this is the number of subscription billing\ + \ cycles for which the addon is included. If not provided,\ + \ then [the value set under attached addons](./attached_items?prod_cat_ver=2#attached_item_attributes)\ + \ is used. Further, if that value is not provided, then [the\ + \ value set for the addon-item price](./item_prices?prod_cat_ver=2#item_price_attributes)\ + \ is used.\n" + items: + minimum: 0 + type: integer + format: int32 + deprecated: false + trial_end: + type: array + description: | + The date/time when the trial period of the item ends. Applies to plan-items and----when [enabled](https://www.chargebee.com/docs/2.0/addons-trial.html)----addon-items as well. + items: + pattern: "^[0-9]{10}$" + type: integer + format: unix-time + deprecated: false + service_period_days: + type: array + description: | + The service period of the item in days from the day of charge. + items: + maximum: 730 + minimum: 1 + type: integer + format: int32 + deprecated: false + charge_on_event: + type: array + items: + type: string + description: | + When `charge_on_option` option is set to `on_event`, this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items. \* contract_termination - when a contract term is [terminated](./subscriptions?prod_cat_ver=2#cancel_subscription_for_items_contract_term_cancel_option). \* subscription_trial_start - the time when the trial period of the subscription begins. \* plan_activation - same as subscription activation, but also includes the case when the plan-item of the subscription is changed. \* subscription_activation - the moment a subscription enters an `active` or `non-renewing` state. Also includes reactivations of canceled subscriptions. \* subscription_creation - the time of creation of the subscription. + deprecated: false + enum: + - subscription_creation + - subscription_trial_start + - plan_activation + - subscription_activation + - contract_termination + charge_once: + type: array + description: | + Indicates if the charge-item is to be charged only once or each time the `charge_on_event` occurs. This parameter only applies to charge-items. + items: + type: boolean + deprecated: false + charge_on_option: + type: array + items: + type: string + description: | + Indicates when the charge-item is to be charged. This parameter only applies to charge-items. \* on_event - The item is charged at the occurrence of the event specified as `charge_on_event`. \* immediately - The item is charged immediately on being added to the subscription. + deprecated: false + enum: + - immediately + - on_event + description: | + Parameters for subscription_items + deprecated: false + discounts: + required: + - apply_on + - duration_type + - operation_type + type: object + properties: + apply_on: + type: array + items: + type: string + description: | + The amount on the quote to which the discount is applied. \* invoice_amount - The discount is applied to the invoice `sub_total`. \* specific_item_price - The discount is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id`. + deprecated: false + enum: + - invoice_amount + - specific_item_price + duration_type: + type: array + items: + type: string + description: | + Specifies the time duration for which this discount is attached to the subscription. \* forever - The discount is attached to the subscription and applied on the invoices till it is [explicitly removed](/docs/api/subscriptions?prod_cat_ver=2#update_subscription_for_items_discounts_operation_type). \* limited_period - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period` and `period_unit`. \* one_time - The discount stays attached to the subscription till it is applied on an invoice **once**. It is removed after that from the subscription. + deprecated: false + default: forever + enum: + - one_time + - forever + - limited_period + percentage: + type: array + description: | + The percentage of the original amount that should be deducted from it. Only applicable when `discount.type` is percentage. + items: + maximum: 100 + minimum: 0.01 + type: number + format: double + deprecated: false + amount: + type: array + description: | + The value of the discount. [The format of this value](https://apidocs.chargebee.com/docs/api?prod_cat_ver=2#currencies) depends on the kind of currency. This is only applicable when `discount.type` is `fixed_amount`. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + period: + type: array + description: | + The duration of time for which the discount is attached to the subscription, in `period_units`. Applicable only when `duration_type` is `limited_period`. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + period_unit: + type: array + items: + type: string + description: | + The unit of time for `period`. Applicable only when `duration_type` is `limited_period`. \* day - A period of 24 hours. \* week - A period of 7 days. \* month - A period of 1 calendar month. \* year - A period of 1 calendar year. + deprecated: false + enum: + - day + - week + - month + - year + included_in_mrr: + type: array + description: | + The discount is included in MRR calculations for your site. This attribute is only applicable when `duration_type` is `one_time` and when the [feature is enabled](https://www.chargebee.com/docs/reporting.html#dashboards_flexible-mrr-calculation) in Chargebee. Also, If the [site-level setting](https://www.chargebee.com/docs/reporting.html#chart_flexible-mrr-calculation) is to exclude one-time discounts from MRR calculations, this value is always returned `false`. + items: + type: boolean + deprecated: false + item_price_id: + type: array + description: | + The [id of the item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) in the subscription to which the discount is to be applied. Relevant only when `apply_on` = `specific_item_price`. + items: + maxLength: 100 + type: string + deprecated: false + operation_type: + type: array + items: + type: string + description: | + The operation to be carried out for the discount. \* add - The discount is attached to the subscription. \* remove - The discount (given by `discounts[id]`) is removed from the subscription. Subsequent invoices will no longer have the discount applied. **Tip:** If you want to replace a discount, `remove` it and `add` another in the same API call. + deprecated: false + enum: + - add + - remove + id: + type: array + description: | + The id of the discount to be removed or updated. This parameter is only relevant when `discounts[operation_type]` is `remove` or `update`. + items: + maxLength: 50 + type: string + deprecated: false + description: | + Parameters for discounts + deprecated: false + item_tiers: + type: object + properties: + item_price_id: + type: array + description: | + The id of the item price for which the tier price is being overridden. + items: + maxLength: 100 + type: string + deprecated: false + starting_unit: + type: array + description: | + The lowest value in the quantity tier. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + ending_unit: + type: array + description: | + The highest value in the quantity tier. + items: + type: integer + format: int32 + deprecated: false + price: + type: array + description: | + The overridden price of the tier. The value depends on the [type of currency](./#handling_currency_units). + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + default: 0 + starting_unit_in_decimal: + type: array + description: | + The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal` of the next lower tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + ending_unit_in_decimal: + type: array + description: | + The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal` of the next higher tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + price_in_decimal: + type: array + description: | + The decimal representation of the per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. When the `pricing_model` is `stairstep`, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: | + Parameters for item_tiers + deprecated: false + encoding: + billing_address: + style: deepObject + explode: true + contract_term: + style: deepObject + explode: true + customer: + style: deepObject + explode: true + discounts: + style: deepObject + explode: true + item_tiers: + style: deepObject + explode: true + shipping_address: + style: deepObject + explode: true + subscription: + style: deepObject + explode: true + subscription_items: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - quote + type: object + properties: + quote: + $ref: '#/components/schemas/Quote' + quoted_subscription: + $ref: '#/components/schemas/QuotedSubscription' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /quotes: + get: + summary: List quotes + description: | + List all quotes. + operationId: list_quotes + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]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9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: include_deleted + in: query + description: "If set to true, includes the deleted resources in the response.\ + \ For the deleted resources in the response, the 'deleted'\ + \ attribute will be 'true'." + required: false + style: form + explode: true + schema: + type: boolean + default: false + - name: id + in: query + description: "optional, string filter
The\ + \ quote number. Acts as a identifier for quote and typically generated sequentially.
Supported\ + \ operators : is, is_not, starts_with, in, not_in

Example\ + \ id[is] = \"123\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: "123" + deprecated: false + - name: customer_id + in: query + description: "optional, string filter
The\ + \ identifier of the customer this quote belongs to.
Supported operators\ + \ : is, is_not, starts_with, in, not_in

Example customer_id[is_not] = \"4gmiXbsjdm\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: 4gmiXbsjdm + deprecated: false + - name: subscription_id + in: query + description: "optional, string filter
To\ + \ filter based on subscription_id.
NOTE: Not to be used if consolidated\ + \ invoicing feature is enabled.
Supported operators : is,\ + \ is_not, starts_with, is_present, in, not_in

Example subscription_id[is_not] = \"4gmiXbsjdm\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: 4gmiXbsjdm + deprecated: false + - name: status + in: query + description: "optional, enumerated string filter
Current\ + \ status of this quote. Possible values are : open, accepted, declined,\ + \ invoiced, closed.
Supported operators : is, is_not, in,\ + \ not_in

Example status[is]\ + \ = \"open\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`open\` - Open \* \`accepted\` - Accepted. \* \`declined\` - Declined. \* \`invoiced\` - Invoiced \* \`closed\` - Closed + enum: + - open + - accepted + - declined + - invoiced + - closed + is_not: + type: string + description: | + \* \`open\` - Open \* \`accepted\` - Accepted. \* \`declined\` - Declined. \* \`invoiced\` - Invoiced \* \`closed\` - Closed + enum: + - open + - accepted + - declined + - invoiced + - closed + in: + pattern: "^\\[(open|accepted|declined|invoiced|closed)(,(open|accepted|declined|invoiced|closed))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(open|accepted|declined|invoiced|closed)(,(open|accepted|declined|invoiced|closed))*\\\ + ]$" + type: string + example: open + deprecated: false + - name: date + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
Creation date of the quote. Typically this is the date\ + \ on which quote is generated.
Supported operators : after, before,\ + \ on, between

Example date[on]\ + \ = \"1435054328\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1435054328" + deprecated: false + - name: updated_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
To filter based on updated at. This attribute will be\ + \ present only if the resource has been updated after 2016-09-28.
Supported\ + \ operators : after, before, on, between

Example updated_at[on] = \"1243545465\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1243545465" + deprecated: false + - name: sort_by + in: query + description: "optional, string filter
Sorts\ + \ based on the specified attribute.
Supported attributes : date
Supported\ + \ sort-orders : asc, desc

Example sort_by[asc] = \"date\"
This will\ + \ sort the result based on the 'date' attribute in ascending(earliest first)\ + \ order." + required: false + style: deepObject + explode: true + schema: + minProperties: 1 + type: object + properties: + asc: + type: string + enum: + - date + desc: + type: string + enum: + - date + additionalProperties: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - quote + type: object + properties: + quote: + $ref: '#/components/schemas/Quote' + quoted_subscription: + $ref: '#/components/schemas/QuotedSubscription' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /quotes/{quote-id}/pdf: + post: + summary: Retrieve a quote as PDF + description: | + Retrieves the quote as a PDF. The returned URL is secure, allows download and expires in 60 minutes. + operationId: retrieve_quote_as_pdf + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?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?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: quote-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + consolidated_view: + type: boolean + description: | + When true, the quote PDF has summary of all charges on the quote. When false, the quote PDF has a detailed view of charges grouped by charge event. This parameter does not affect one-time quotes. + deprecated: false + default: false + disposition_type: + type: string + description: | + Determines the pdf should be rendered as inline or attachment in the browser. \* attachment - PDF is rendered as attachment in the browser \* inline - PDF is rendered as inline in the browser + deprecated: false + default: attachment + enum: + - attachment + - inline + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - download + type: object + properties: + download: + $ref: '#/components/schemas/Download' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /quotes/{quote-id}/convert: + post: + summary: Convert a quote + description: | + This API is to convert a quote to an invoice. + operationId: convert_a_quote + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])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9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: quote-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + invoice_date: + pattern: "^[0-9]{10}$" + type: integer + description: | + The document date displayed on the invoice PDF. Provide this value to backdate the invoice. Backdating an invoice is done for reasons such as booking revenue for a previous date or when the subscription is effective as of a past date. When not provided, the value is the same as current date. Moreover, if the invoice is created as `pending`, and if the site is configured to set invoice dates to date of closing, then upon invoice closure, this date is changed to the invoice closing date. `taxes` and `line_item_taxes` are computed based on the tax configuration as of `invoice_date`. When passing this parameter, the following prerequisites must be met: + + * `invoice_date` must be in the past. + * `invoice_date` is not more than one calendar month into the past. For example, if today is 13th January, then you cannot pass a value that is earlier than 13th December. + * The date is not earlier than `quoted_subscription.start_date` or `quoted_subscription.changes_scheduled_at` (whichever is applicable). + * `invoice_immediately` must be `true`. + . + format: unix-time + deprecated: false + create_pending_invoices: + type: boolean + description: | + This attribute is set to `true` automatically for the subscription when it has one or more `metered` items. However, when there are no `metered` items, you can pass this parameter as `true` to force all invoices (except the first) to be created as `pending`. This is useful in the following scenarios: + + * When you manage metered billing at your end by calculating usage-based charges yourself and add them to the subscription as [one-time charges](https://www.chargebee.com/docs/2.0/charges.html). + * When your workflow involves inspecting all charges before you close invoices. + + **Note:** + + * You must enable [Metered Billing](https://www.chargebee.com/docs/2.0/metered_billing.html) for this parameter to be acceptable. + * To create the first invoice also as `pending`, pass `first_invoice_pending` as `true`. + . + deprecated: false + first_invoice_pending: + type: boolean + description: "Non-metered items are billed at the beginning of a\ + \ billing cycle while metered items are billed at the end. Consequently,\ + \ the first invoice of the subscription contains only the non-metered\ + \ items.\n\nBy passing this parameter as `true`, you create the\ + \ first invoice as `pending` allowing you to add the previous\ + \ term's metered charges to it before closing. This is useful\ + \ when the subscription is moved to Chargebee from a different\ + \ billing system. As applicable to all `pending` invoices, this\ + \ invoice is also [closed automatically](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing)\ + \ or via an [API call](/docs/api/invoices?prod_cat_ver=2#close_a_pending_invoice).\ + \ \n**Note:**\n\nThis parameter is passed only when there are\ + \ metered items in the subscription or when `create_pending_invoices`\ + \ is `true`.\n.\n" + deprecated: false + default: false + subscription: + type: object + properties: + id: + maxLength: 50 + type: string + description: | + Applicable only for create subscription quote. + deprecated: false + auto_collection: + type: string + description: | + Applicable only for create subscription quote. \* off - Automatic collection of charges will not be made for this subscription. Use this for offline payments. \* on - Whenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available. + deprecated: false + enum: + - "on" + - "off" + po_number: + maxLength: 100 + type: string + description: | + Purchase order number for this subscription. + deprecated: false + auto_close_invoices: + type: boolean + description: | + When [auto-closing of invoices](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing) is enabled for the site, you can pass this parameter as `false` to prevent the automatic closing of invoices for this subscription. The value passed here takes precedence over the value stored at the [customer level](/docs/api/customers?prod_cat_ver=2#customer_auto_close_invoices). + deprecated: false + description: | + Parameters for subscription + deprecated: false + encoding: + subscription: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - customer + - quote + type: object + properties: + quote: + $ref: '#/components/schemas/Quote' + quoted_subscription: + $ref: '#/components/schemas/QuotedSubscription' + quoted_charge: + $ref: '#/components/schemas/QuotedCharge' + customer: + $ref: '#/components/schemas/Customer' + subscription: + $ref: '#/components/schemas/Subscription' + invoice: + $ref: '#/components/schemas/Invoice' + credit_note: + $ref: '#/components/schemas/CreditNote' + unbilled_charges: + type: array + items: + $ref: '#/components/schemas/UnbilledCharge' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /quotes/create_for_charge_items_and_charges: + post: + summary: Create a quote for charges and charge items + description: | + Creates a quote using charge-items and one-time charges. + operationId: create_a_quote_for_charge_and_charge_items + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema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-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - customer_id + type: object + properties: + name: + maxLength: 100 + type: string + description: | + The quote name will be used as the pdf name of the quote. + deprecated: false + customer_id: + maxLength: 50 + type: string + description: | + Identifier of the customer for which the quote needs to be created. + deprecated: false + po_number: + maxLength: 100 + type: string + description: | + Purchase Order Number for this quote. + deprecated: false + notes: + maxLength: 2000 + type: string + description: | + Notes specific to this quote that you want customers to see on the quote PDF. + deprecated: false + expires_at: + pattern: "^[0-9]{10}$" + type: integer + description: | + Quotes will be valid till this date. After this quote will be marked as closed. + format: unix-time + deprecated: false + currency_code: + maxLength: 3 + type: string + description: | + The currency code (ISO 4217 format) of the quote. + deprecated: false + coupon: + maxLength: 100 + type: string + description: | + The 'One Time' coupon to be applied. + deprecated: false + coupon_ids: + type: array + description: | + List of Coupons to be added. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + shipping_address: + type: object + properties: + first_name: + maxLength: 150 + type: string + description: | + The first name of the contact. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + The last name of the contact. + deprecated: false + email: + maxLength: 70 + type: string + description: | + The email address. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + The company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + The phone number. + deprecated: false + line1: + maxLength: 150 + type: string + description: | + Address line 1 + deprecated: false + line2: + maxLength: 150 + type: string + description: | + Address line 2 + deprecated: false + line3: + maxLength: 150 + type: string + description: | + Address line 3 + deprecated: false + city: + maxLength: 50 + type: string + description: | + The name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the\ + \ system will return an error. \n\n**Brexit**\n\n\nIf you\ + \ have enabled [EU VAT](https://www.chargebee.com/docs/eu-vat.html)\ + \ in 2021 or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United\ + \ Kingdom -- Northern Ireland**) is available as an option.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* invalid - Address is invalid. \* not_validated - Address is not yet validated. \* valid - Address was validated successfully. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + description: | + Parameters for shipping_address + deprecated: false + item_prices: + type: object + properties: + item_price_id: + type: array + description: | + A unique ID for your system to identify the item price. + items: + maxLength: 100 + type: string + deprecated: false + quantity: + type: array + description: | + Item price quantity + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + quantity_in_decimal: + type: array + description: | + The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + unit_price: + type: array + description: | + The price or per-unit-price of the item price. By default, it is the [value set](/docs/api/item_prices#item_price_price) for the `item_price`. This is only applicable when the `pricing_model` of the `item_price` is `flat_fee` or `per_unit`. The value depends on the [type of currency](/docs/api/#handling_currency_units). + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + unit_price_in_decimal: + type: array + description: | + The decimal representation of the price or per-unit price of the plan. The value is in major units of the currency. Always returned when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + service_period_days: + type: array + description: | + Defines service period of the item in days from the day of charge. + items: + maximum: 730 + minimum: 1 + type: integer + format: int32 + deprecated: false + description: | + Parameters for item_prices + deprecated: false + item_tiers: + type: object + properties: + item_price_id: + type: array + description: | + The id of the item price to which this tier belongs. + items: + maxLength: 100 + type: string + deprecated: false + starting_unit: + type: array + description: | + The lowest value in the quantity tier. + items: + minimum: 1 + type: integer + format: int32 + deprecated: false + ending_unit: + type: array + description: | + The highest value in the quantity tier. + items: + type: integer + format: int32 + deprecated: false + price: + type: array + description: | + The per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. The total cost for the item price when the `pricing_model` is `stairstep`. The value is in the minor unit of the currency. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + default: 0 + starting_unit_in_decimal: + type: array + description: | + The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal` of the next lower tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + ending_unit_in_decimal: + type: array + description: | + The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the `starting_unit_in_decimal` of the next higher tier. Returned only when the pricing_model is `tiered`, `volume` or `stairstep` and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 33 + type: string + deprecated: false + price_in_decimal: + type: array + description: | + The decimal representation of the per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. When the `pricing_model` is `stairstep`, it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: | + Parameters for item_tiers + deprecated: false + charges: + type: object + properties: + amount: + type: array + description: | + The amount to be charged. The unit depends on the [type of currency](/docs/api?prod_cat_ver=1#md_disabled). + items: + minimum: 1 + type: integer + format: int64 + deprecated: false + amount_in_decimal: + type: array + description: | + The decimal representation of the amount for the one-time charge. The value is in [major units of the currency](/docs/api#md_enabled). Applicable only when multi-decimal pricing is enabled. + items: + maxLength: 39 + type: string + deprecated: false + description: + type: array + description: | + Description for this charge + items: + maxLength: 250 + type: string + deprecated: false + avalara_sale_type: + type: array + items: + type: string + description: | + Indicates the type of sale carried out. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. \* consumed - Transaction is for an item that is consumed directly \* vendor_use - Transaction is for an item that is subject to vendor use tax \* wholesale - Transaction is a sale to another company that will resell your product or service to another consumer \* retail - Transaction is a sale to an end user + deprecated: false + enum: + - wholesale + - retail + - consumed + - vendor_use + avalara_transaction_type: + type: array + description: | + Indicates the type of product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. + items: + type: integer + format: int32 + deprecated: false + avalara_service_type: + type: array + description: | + Indicates the type of service for the product to be taxed. Values for this field can be taken from Avalara. This is applicable only if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. + items: + type: integer + format: int32 + deprecated: false + service_period: + type: array + description: | + Service period for charge + items: + type: integer + format: int32 + deprecated: false + description: | + Parameters for charges + deprecated: false + discounts: + required: + - apply_on + type: object + properties: + percentage: + type: array + description: | + The percentage of the original amount that should be deducted from it. Only applicable when `discount.type` is percentage. + items: + maximum: 100 + minimum: 0.01 + type: number + format: double + deprecated: false + amount: + type: array + description: | + The value of the discount. [The format of this value](https://apidocs.chargebee.com/docs/api?prod_cat_ver=2#currencies) depends on the kind of currency. This is only applicable when `discount.type` is `fixed_amount`. + items: + minimum: 0 + type: integer + format: int64 + deprecated: false + apply_on: + type: array + items: + type: string + description: | + The amount on the quote to which the discount is applied. \* invoice_amount - The discount is applied to the invoice `sub_total`. \* specific_item_price - The discount is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id`. + deprecated: false + enum: + - invoice_amount + - specific_item_price + item_price_id: + type: array + description: | + The [id of the item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) in the subscription to which the discount is to be applied. Relevant only when `apply_on` = `specific_item_price`. + items: + maxLength: 100 + type: string + deprecated: false + description: | + Parameters for discounts + deprecated: false + tax_providers_fields: + type: object + properties: + provider_name: + type: array + items: + maxLength: 50 + type: string + deprecated: false + field_id: + type: array + items: + maxLength: 50 + type: string + deprecated: false + field_value: + type: array + items: + maxLength: 50 + type: string + deprecated: false + description: | + Parameters for tax_providers_fields + deprecated: false + encoding: + charges: + style: deepObject + explode: true + discounts: + style: deepObject + explode: true + item_prices: + style: deepObject + explode: true + item_tiers: + style: deepObject + explode: true + shipping_address: + style: deepObject + explode: true + tax_providers_fields: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - quote + type: object + properties: + quote: + $ref: '#/components/schemas/Quote' + quoted_charge: + $ref: '#/components/schemas/QuotedCharge' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /quotes/{quote-id}/delete: + post: + summary: Delete a quote + description: | + Delete a quote using this API. + operationId: delete_a_quote + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-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F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: quote-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + comment: + maxLength: 300 + type: string + description: | + Reason for deleting quote. This comment will be added to the subscription entity if the quote belongs to a subscription or added to the customer entity if the quote is associated only with a customer. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - quote + type: object + properties: + quote: + $ref: '#/components/schemas/Quote' + quoted_subscription: + $ref: '#/components/schemas/QuotedSubscription' + quoted_charge: + $ref: '#/components/schemas/QuotedCharge' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /coupons: + get: + summary: List coupons + description: | + List all the available coupons that are created for a specific promotion or offers. You can find list of coupon codes that are currently active, expired, archived or deleted. + operationId: list_coupons + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?: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-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: id + in: query + description: |- + optional, string filter

Used to uniquely identify the coupon in your website/application and to integrate with Chargebee.

+
+

Note:

+

+ When the coupon ID contains a special character; for example: #, the API returns an error. + Make sure that you encode the coupon ID in the path parameter before making an API call. +

+
.
Supported operators : is, is_not, starts_with, in, not_in

Example id[is] = "OFF2008" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: OFF2008 + deprecated: false + - name: name + in: query + description: |- + optional, string filter

The display name used in web interface for identifying the coupon.

+
+

Note:

+

+ When the name of the coupon set contains a special character; for example: #, the API returns an error. + Make sure that you encode the name of the coupon set in the path parameter before making an API call. +

+
.
Supported operators : is, is_not, starts_with, in, not_in

Example name[is_not] = "Offer 10" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: Offer 10 + deprecated: false + - name: discount_type + in: query + description: "optional, enumerated string filter
The\ + \ type of deduction. Possible values are : fixed_amount, percentage.
Supported\ + \ operators : is, is_not, in, not_in

Example discount_type[is] = \"fixed_amount\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`fixed_amount\` - The specified amount will be deducted. \* \`percentage\` - The specified percentage will be deducted. \* \`offer_quantity\` - \*\*(Deprecated)\*\* The specified units will be offered for free. + enum: + - fixed_amount + - percentage + is_not: + type: string + description: | + \* \`fixed_amount\` - The specified amount will be deducted. \* \`percentage\` - The specified percentage will be deducted. \* \`offer_quantity\` - \*\*(Deprecated)\*\* The specified units will be offered for free. + enum: + - fixed_amount + - percentage + in: + pattern: "^\\[(fixed_amount|percentage|offer_quantity)(,(fixed_amount|percentage|offer_quantity))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(fixed_amount|percentage|offer_quantity)(,(fixed_amount|percentage|offer_quantity))*\\\ + ]$" + type: string + example: fixed_amount + deprecated: false + - name: duration_type + in: query + description: "optional, enumerated string filter
Specifies\ + \ the time duration for which this coupon is attached to the subscription.\ + \ Possible values are : one_time, forever, limited_period.
Supported\ + \ operators : is, is_not, in, not_in

Example duration_type[is] = \"forever\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`one_time\` - The coupon stays attached to the subscription till it is applied on an invoice **once** . It is removed after that from the subscription. \* \`forever\` - The coupon is attached to the subscription and applied on the invoices until explicitly removed. \* \`limited_period\` - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period` and `period_unit`. + enum: + - one_time + - forever + - limited_period + is_not: + type: string + description: | + \* \`one_time\` - The coupon stays attached to the subscription till it is applied on an invoice **once** . It is removed after that from the subscription. \* \`forever\` - The coupon is attached to the subscription and applied on the invoices until explicitly removed. \* \`limited_period\` - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period` and `period_unit`. + enum: + - one_time + - forever + - limited_period + in: + pattern: "^\\[(one_time|forever|limited_period)(,(one_time|forever|limited_period))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(one_time|forever|limited_period)(,(one_time|forever|limited_period))*\\\ + ]$" + type: string + example: forever + deprecated: false + - name: status + in: query + description: "optional, enumerated string filter
Status\ + \ of the coupon. Possible values are : active, expired, archived, deleted.
Supported\ + \ operators : is, is_not, in, not_in

Example status[is_not] = \"active\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`active\` - Can be applied to a subscription. \* \`expired\` - Cannot be applied to a subscription. A coupon may expire due to exceeding [max_redemptions](/docs/api/coupons?#coupon_max_redemptions) or [valid_till](/docs/api/coupons?#coupon_valid_till) date is past. Existing associations remain unaffected. \* \`archived\` - Cannot be applied to a subscription. Existing associations remain unaffected. \* \`deleted\` - Indicates the coupon has been deleted. + enum: + - active + - expired + - archived + - deleted + is_not: + type: string + description: | + \* \`active\` - Can be applied to a subscription. \* \`expired\` - Cannot be applied to a subscription. A coupon may expire due to exceeding [max_redemptions](/docs/api/coupons?#coupon_max_redemptions) or [valid_till](/docs/api/coupons?#coupon_valid_till) date is past. Existing associations remain unaffected. \* \`archived\` - Cannot be applied to a subscription. Existing associations remain unaffected. \* \`deleted\` - Indicates the coupon has been deleted. + enum: + - active + - expired + - archived + - deleted + in: + pattern: "^\\[(active|expired|archived|deleted)(,(active|expired|archived|deleted))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(active|expired|archived|deleted)(,(active|expired|archived|deleted))*\\\ + ]$" + type: string + example: active + deprecated: false + - name: apply_on + in: query + description: "optional, enumerated string filter
The\ + \ amount on the invoice to which the coupon is applied. Possible values\ + \ are : invoice_amount, each_specified_item.
Supported\ + \ operators : is, is_not, in, not_in

Example apply_on[is] = \"invoice_amount\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: "\\* \\`invoice_amount\\` - The coupon is applied to the\ + \ invoice `sub_total`. \\* \\`specified_items_total\\` - \\*\\*(Deprecated)\\\ + *\\* Discount will be applied to the total of plan and addon items\ + \ specified. \\* \\`each_specified_item\\` - \nThe coupon is applied\ + \ to the `invoice.line_item.amount` that corresponds to the item price\ + \ specified by `item_price_id`. \nThe coupon is applied to the `invoice.line_item.amount`\ + \ that corresponds to the plan or addon specified by `plan_ids` and\ + \ `addon_ids`. \\* \\`each_unit_of_specified_items\\` - \\*\\*(Deprecated)\\\ + *\\* Discount will be applied to each unit of plan and addon items\ + \ specified.\n" + enum: + - invoice_amount + - each_specified_item + is_not: + type: string + description: "\\* \\`invoice_amount\\` - The coupon is applied to the\ + \ invoice `sub_total`. \\* \\`specified_items_total\\` - \\*\\*(Deprecated)\\\ + *\\* Discount will be applied to the total of plan and addon items\ + \ specified. \\* \\`each_specified_item\\` - \nThe coupon is applied\ + \ to the `invoice.line_item.amount` that corresponds to the item price\ + \ specified by `item_price_id`. \nThe coupon is applied to the `invoice.line_item.amount`\ + \ that corresponds to the plan or addon specified by `plan_ids` and\ + \ `addon_ids`. \\* \\`each_unit_of_specified_items\\` - \\*\\*(Deprecated)\\\ + *\\* Discount will be applied to each unit of plan and addon items\ + \ specified.\n" + enum: + - invoice_amount + - each_specified_item + in: + pattern: "^\\[(invoice_amount|specified_items_total|each_specified_item|each_unit_of_specified_items)(,(invoice_amount|specified_items_total|each_specified_item|each_unit_of_specified_items))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(invoice_amount|specified_items_total|each_specified_item|each_unit_of_specified_items)(,(invoice_amount|specified_items_total|each_specified_item|each_unit_of_specified_items))*\\\ + ]$" + type: string + example: invoice_amount + deprecated: false + - name: created_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
Timestamp indicating when this coupon is created.
Supported\ + \ operators : after, before, on, between

Example created_at[before] = \"145222875\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "145222875" + deprecated: false + - name: updated_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
To filter based on updated at. This attribute will be\ + \ present only if the resource has been updated after 2016-11-09.
Supported\ + \ operators : after, before, on, between

Example updated_at[on] = \"1243545465\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1243545465" + deprecated: false + - name: sort_by + in: query + description: "optional, string filter
Sorts\ + \ based on the specified attribute.
Supported attributes : created_at
Supported\ + \ sort-orders : asc, desc

Example sort_by[asc] = \"created_at\"
This\ + \ will sort the result based on the 'created_at' attribute in ascending(earliest\ + \ first) order." + required: false + style: deepObject + explode: true + schema: + minProperties: 1 + type: object + properties: + asc: + type: string + enum: + - created_at + desc: + type: string + enum: + - created_at + additionalProperties: false + - name: currency_code + in: query + description: "optional, string filter
The\ + \ currency code (ISO 4217 format) of the coupon. Applicable for fixed_amount\ + \ coupons alone.
Supported operators : is, is_not, starts_with,\ + \ in, not_in

Example currency_code[is]\ + \ = \"USD\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: USD + deprecated: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - coupon + type: object + properties: + coupon: + $ref: '#/components/schemas/Coupon' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /coupons/{coupon-id}/update_for_items: + post: + summary: Update a coupon for items + description: | + This API updates a coupon that is created for a specific promotion or offers. + operationId: update_a_coupon_for_items + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\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-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: coupon-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + name: + maxLength: 50 + type: string + description: "The display name used in web interface for identifying\ + \ the coupon. \n**Note:**\n\n\nWhen the name of the coupon set\ + \ contains a special character; for example: `#`, the API returns\ + \ an error.\nMake sure that you [encode](https://www.urlencoder.org/)\ + \ the name of the coupon set in the path parameter before making\ + \ an API call.\n.\n" + deprecated: false + invoice_name: + maxLength: 100 + type: string + description: | + Display name used in invoice. If it is not configured then name is used in invoice. + deprecated: false + discount_type: + type: string + description: | + The type of deduction. \* percentage - The specified percentage will be deducted. \* fixed_amount - The specified amount will be deducted. \* offer_quantity - The specified units will be offered for free. + deprecated: false + default: percentage + enum: + - fixed_amount + - percentage + discount_amount: + minimum: 0 + type: integer + description: | + The value of the deduction. The format of this value depends on the [kind of currency](/docs/api#currencies). + format: int64 + deprecated: false + currency_code: + maxLength: 3 + type: string + description: | + The currency code ([ISO 4217 format](https://www.chargebee.com/docs/2.0/supported-currencies.html)) of the coupon. Applicable for *fixed_amount* coupons alone. + deprecated: false + discount_percentage: + maximum: 100 + minimum: 0.01 + type: number + description: | + The percentage of the original amount that should be deducted from it. + format: double + deprecated: false + apply_on: + type: string + description: | + The amount on the invoice to which the coupon is applied. \* invoice_amount - The coupon is applied to the invoice `sub_total`. \* each_unit_of_specified_items - Discount will be applied to each unit of plan and addon items specified. \* each_specified_item - The coupon is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id`. \* specified_items_total - Discount will be applied to the total of plan and addon items specified. + deprecated: false + enum: + - invoice_amount + - each_specified_item + duration_type: + type: string + description: | + Specifies the time duration for which this coupon is attached to the subscription. \* forever - The coupon is attached to the subscription and applied on the invoices until explicitly removed. \* one_time - The coupon stays attached to the subscription till it is applied on an invoice **once** . It is removed after that from the subscription. \* limited_period - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period` and `period_unit`. + deprecated: false + default: forever + enum: + - one_time + - forever + - limited_period + duration_month: + maximum: 240 + minimum: 1 + type: integer + description: "**(Deprecated)** The duration of time in months for\ + \ which the coupon is attached to the subscription. Applicable\ + \ only when `duration_type` is `limited_period`. \n**Note:**\ + \ This parameter has been deprecated. Use `period` and `period_unit`\ + \ instead.\n" + format: int32 + deprecated: false + valid_till: + pattern: "^[0-9]{10}$" + type: integer + description: | + Date upto which the coupon can be applied to new subscriptions. + format: unix-time + deprecated: false + max_redemptions: + minimum: 1 + type: integer + description: "Maximum number of times this coupon can be redeemed.\ + \ \n**Note:**\n\n\nIf not specified, the coupon can be redeemed\ + \ an indefinite number of times.\n.\n" + format: int32 + deprecated: false + invoice_notes: + maxLength: 2000 + type: string + description: | + A customer-facing note added to all invoices associated with this API resource. This note becomes one among [all the notes](/docs/api/invoices#invoice_notes) displayed on the invoice PDF. + deprecated: false + meta_data: + type: object + additionalProperties: true + description: | + A collection of key-value pairs that provides extra information about the coupon. \*\*Note:\*\* There's a character limit of 65,535. \[Learn more\](advanced-features?prod_cat_ver=2#metadata). + deprecated: false + included_in_mrr: + type: boolean + description: | + The coupon is included in MRR calculations for your site. This attribute is only applicable for coupons of `duration_type = one_time` and when the feature is enabled in Chargebee. Note: If the site-level setting is to exclude one-time coupons from MRR calculations, this value is always returned `false`. + deprecated: false + period: + minimum: 1 + type: integer + description: | + The duration of time for which the coupon is attached to the subscription, in `period_units`. Applicable only when [duration_type](/docs/api/coupons?#coupon_duration_type) is [limited_period](/docs/api/coupons?#coupon_duration_type). + format: int32 + deprecated: false + period_unit: + type: string + description: | + The unit of time for period. Applicable only when [duration_type](/docs/api/coupons?#coupon_duration_type) is [limited_period](/docs/api/coupons?#coupon_duration_type). \* month - A period of 1 calendar month. \* week - A period of 7 days. \* year - A period of 1 calendar year. \* day - A period of 24 hours. + deprecated: false + enum: + - day + - week + - month + - year + item_constraints: + required: + - constraint + - item_type + type: object + properties: + constraint: + type: array + items: + type: string + description: | + Constraint applicable for the item \* specific - Coupon applicable to specific items. \* all - Coupon applicable to all items. \* criteria - Coupon applicable based on criteria. \* none - Coupon not applicable to any items. + deprecated: false + enum: + - none + - all + - specific + - criteria + item_type: + type: array + items: + type: string + description: | + Item type for which this criteria is applicable for. \* charge - Charge \* plan - Plan \* addon - Addon + deprecated: false + enum: + - plan + - addon + - charge + item_price_ids: + type: array + description: "List of item price ids for which this coupon is\ + \ applicable. \n\n**Note:**\n\n\nWhen specifying a value\ + \ for `item_price_ids`, make sure that the value is wrapped\ + \ in square brackets (`[]`), for example:\n`[cbdemo_advanced-USD-Daily]`\ + \ instead of `cbdemo_advanced-USD-Daily`; otherwise, a `param_wrong_value`\ + \ error returns.\n\n\n\nFor information about `item_price_ids`,\ + \ refer to *Defining Price Points* in [Plans](https://www.chargebee.com/docs/2.0/plans.html#defining-price-points-for-plan),\ + \ [Addons](https://www.chargebee.com/docs/2.0/addons.html#defining-price-points-for-an-addon),\n\ + and [Charges](https://www.chargebee.com/docs/2.0/charges.html#defining-price-points-for-a-charge).\n" + items: + type: array + deprecated: false + items: {} + description: | + Parameters for item_constraints + deprecated: false + item_constraint_criteria: + type: object + properties: + item_type: + type: array + items: + type: string + description: | + Item type for which this criteria is applicable for. \* charge - Charge is a type of item \* plan - Plan is a type of item \* addon - Addon is a type of item + deprecated: false + enum: + - plan + - addon + - charge + item_family_ids: + type: array + description: | + List of families for which this coupon is applicable. + items: + type: array + deprecated: false + items: {} + currencies: + type: array + description: | + List of currencies ([ISO 4217 format](https://www.chargebee.com/docs/supported-currencies.html)) for which this coupon is applicable. + items: + type: array + deprecated: false + items: {} + item_price_periods: + type: array + description: | + Pass the item price period units for this criterion. `period` followed by `period_units`. Such as `[1 day,1 week,3 month,6 month]` + items: + type: array + deprecated: false + items: {} + description: | + Parameters for item_constraint_criteria + deprecated: false + coupon_constraints: + required: + - entity_type + - type + type: object + properties: + entity_type: + type: array + items: + type: string + description: | + The resource type for the constraint. This, along with `type` and `value`, helps define the specific rule applied. \* customer - The constraint is based on `customer` records. + deprecated: false + enum: + - customer + type: + type: array + items: + type: string + description: | + The type of coupon constraint. \* unique_by - Indicates - when `entity_type` is `customer` - that the coupon can be redeemed only once for every unique value of a specified `customer` attribute. The `customer` attribute is specified using `value`. For example, if `value` is `email`, then the coupon can be redeemed only once for every unique value of `customer.email`. In other words, when there are multiple `customer` records with the same value for `email`, once the coupon has been redeemed for one of those customer records, no further redemptions of the coupon are allowed for any of those `customer` records. \* max_redemptions - The coupon can be redeemed up to a set number of times for a specific resource type. The maximum redemptions are specified using `value`, and the resource type is specified using `entity_type`. For example, if `entity_type` is `customer` and `value` is `10` then the coupon can only be redeemed up to 10 times for any particular `customer` record. + deprecated: false + enum: + - max_redemptions + - unique_by + value: + type: array + description: |+ + The value of the coupon constraint. The possible values depend on the value of `constraints[type]`: + + * When `type` is `unique_by`, then `value` can be `email` or `id`. + + * When `type` is `max_redemptions`, then `value` can be any integer in the range `1` `coupon.max_redemptions`, inclusive. + + items: + maxLength: 65000 + type: string + deprecated: false + description: | + Parameters for \`coupon_constraints\`. Multiple \`coupon_constraints\` can be passed by specifying unique indices. + deprecated: false + additionalProperties: true + encoding: + coupon_constraints: + style: deepObject + explode: true + item_constraint_criteria: + style: deepObject + explode: true + item_constraints: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - coupon + type: object + properties: + coupon: + $ref: '#/components/schemas/Coupon' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /coupons/{coupon-id}/unarchive: + post: + summary: Unarchive a coupon + description: | + This API unarchives a specific coupon using the coupon ID. + operationId: unarchive_a_coupon + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|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9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: coupon-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - coupon + type: object + properties: + coupon: + $ref: '#/components/schemas/Coupon' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /coupons/{coupon-id}/delete: + post: + summary: Delete a coupon + description: | + If no Subscriptions/Invoices are linked to this Coupon, the Coupon will be deleted from your Chargebee site. This action cannot be undone. + + To ensure that existing Subscriptions/Invoices are not affected, Coupons associated with them will not be deleted, but moved to "Archived" state. Once a Coupon has been archived, it cannot be edited or used again unless [unarchived](coupons#unarchive_a_coupon). Unused Coupons codes are deleted. + operationId: delete_a_coupon + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: coupon-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - coupon + type: object + properties: + coupon: + $ref: '#/components/schemas/Coupon' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /coupons/copy: + post: + summary: Copy a coupon + description: |+ + Copies a coupon over from one site to another. Copying of [archived](./coupons?prod_cat_ver=2#coupon_status) coupons is not supported. + + The item prices that are linked to the coupon in the source site are also linked to the coupon in the destination site. However, this will only work if those item prices exist and with the same [ids](./item_prices?prod_cat_ver=2#item_price_id), in the destination site. Hence, it is recommended that the item prices be copied over before copying the coupons. + + The value for [redemptions](./coupons?prod_cat_ver=2#coupon_redemptions) is not copied. It is set to `0` for the newly created coupon. Hence, if such a coupon had `expired` in the source site due to `redemptions` having reached [max_redemptions](./coupons?prod_cat_ver=2#coupon_max_redemptions), it's [status](./coupons?prod_cat_ver=2#coupon_status) would be `active` in the destination site. + + operationId: copy_a_coupon + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?: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4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - from_site + - id_at_from_site + type: object + properties: + from_site: + maxLength: 50 + type: string + description: "Your Chargebee site name having the coupon to be copied.\ + \ \n**Note:** Unless you are copying from a twin site (acme \\\ + & acme-test are twin sites), [contact support](https://chargebee.freshdesk.com/support/home)\ + \ to have this allow-listed.\n" + deprecated: false + id_at_from_site: + maxLength: 100 + type: string + description: | + Id of the coupon to be copied. The new coupon created in this site will have the same Id. + deprecated: false + id: + maxLength: 100 + type: string + description: | + Id of copied coupon in this site. + deprecated: false + for_site_merging: + type: boolean + description: "If copy action is performed as part of Chargebee site\ + \ merge action, pass the value as true. \n**Note:** If this parameter\ + \ is passed true coupon state, redemptions, coupon set and coupon\ + \ codes associated with this coupon will be copied.\n" + deprecated: false + default: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - coupon + type: object + properties: + coupon: + $ref: '#/components/schemas/Coupon' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /coupons/{coupon-id}: + get: + summary: Retrieve a coupon + description: | + This API retrieves a specific coupon using the coupon ID. + operationId: retrieve_a_coupon + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: coupon-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - coupon + type: object + properties: + coupon: + $ref: '#/components/schemas/Coupon' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /coupons/create_for_items: + post: + summary: Create a coupon for items + description: | + This API creates a new coupon for a specific promotion or offers. + operationId: create_a_coupon_for_items + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(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?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - apply_on + - id + - name + type: object + properties: + id: + maxLength: 100 + type: string + description: "Used to uniquely identify the coupon in your website/application\ + \ and to integrate with Chargebee. \n**Note:**\n\n\nWhen the\ + \ coupon ID contains a special character; for example: `#`, the\ + \ API returns an error.\nMake sure that you [encode](https://www.urlencoder.org/)\ + \ the coupon ID in the path parameter before making an API call.\n\ + .\n" + deprecated: false + name: + maxLength: 50 + type: string + description: "The display name used in web interface for identifying\ + \ the coupon. \n**Note:**\n\n\nWhen the name of the coupon set\ + \ contains a special character; for example: `#`, the API returns\ + \ an error.\nMake sure that you [encode](https://www.urlencoder.org/)\ + \ the name of the coupon set in the path parameter before making\ + \ an API call.\n.\n" + deprecated: false + invoice_name: + maxLength: 100 + type: string + description: | + Display name used in invoice. If it is not configured then name is used in invoice. + deprecated: false + discount_type: + type: string + description: | + The type of deduction. \* percentage - The specified percentage will be deducted. \* fixed_amount - The specified amount will be deducted. \* offer_quantity - The specified units will be offered for free. + deprecated: false + default: percentage + enum: + - fixed_amount + - percentage + discount_amount: + minimum: 0 + type: integer + description: | + The value of the deduction. The format of this value depends on the [kind of currency](/docs/api#currencies). + format: int64 + deprecated: false + currency_code: + maxLength: 3 + type: string + description: | + The currency code ([ISO 4217 format](https://www.chargebee.com/docs/2.0/supported-currencies.html)) of the coupon. Applicable for *fixed_amount* coupons alone. + deprecated: false + discount_percentage: + maximum: 100 + minimum: 0.01 + type: number + description: | + The percentage of the original amount that should be deducted from it. + format: double + deprecated: false + apply_on: + type: string + description: | + The amount on the invoice to which the coupon is applied. \* invoice_amount - The coupon is applied to the invoice `sub_total`. \* each_unit_of_specified_items - Discount will be applied to each unit of plan and addon items specified. \* each_specified_item - The coupon is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id`. \* specified_items_total - Discount will be applied to the total of plan and addon items specified. + deprecated: false + enum: + - invoice_amount + - each_specified_item + duration_type: + type: string + description: | + Specifies the time duration for which this coupon is attached to the subscription. \* forever - The coupon is attached to the subscription and applied on the invoices until explicitly removed. \* one_time - The coupon stays attached to the subscription till it is applied on an invoice **once** . It is removed after that from the subscription. \* limited_period - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period` and `period_unit`. + deprecated: false + default: forever + enum: + - one_time + - forever + - limited_period + duration_month: + maximum: 240 + minimum: 1 + type: integer + description: "**(Deprecated)** The duration of time in months for\ + \ which the coupon is attached to the subscription. Applicable\ + \ only when `duration_type` is `limited_period`. \n**Note:**\ + \ This parameter has been deprecated. Use `period` and `period_unit`\ + \ instead.\n" + format: int32 + deprecated: false + valid_till: + pattern: "^[0-9]{10}$" + type: integer + description: | + Date upto which the coupon can be applied to new subscriptions. + format: unix-time + deprecated: false + max_redemptions: + minimum: 1 + type: integer + description: "Maximum number of times this coupon can be redeemed.\ + \ \n**Note:**\n\n\nIf not specified, the coupon can be redeemed\ + \ an indefinite number of times.\n.\n" + format: int32 + deprecated: false + invoice_notes: + maxLength: 2000 + type: string + description: | + A customer-facing note added to all invoices associated with this API resource. This note becomes one among [all the notes](/docs/api/invoices#invoice_notes) displayed on the invoice PDF. + deprecated: false + meta_data: + type: object + additionalProperties: true + description: | + A collection of key-value pairs that provides extra information about the coupon. \*\*Note:\*\* There's a character limit of 65,535. \[Learn more\](advanced-features?prod_cat_ver=2#metadata). + deprecated: false + included_in_mrr: + type: boolean + description: | + The coupon is included in MRR calculations for your site. This attribute is only applicable for coupons of `duration_type = one_time` and when the feature is enabled in Chargebee. Note: If the site-level setting is to exclude one-time coupons from MRR calculations, this value is always returned `false`. + deprecated: false + period: + minimum: 1 + type: integer + description: | + The duration of time for which the coupon is attached to the subscription, in `period_units`. Applicable only when [duration_type](/docs/api/coupons?#coupon_duration_type) is [limited_period](/docs/api/coupons?#coupon_duration_type). + format: int32 + deprecated: false + period_unit: + type: string + description: | + The unit of time for period. Applicable only when [duration_type](/docs/api/coupons?#coupon_duration_type) is [limited_period](/docs/api/coupons?#coupon_duration_type). \* month - A period of 1 calendar month. \* week - A period of 7 days. \* year - A period of 1 calendar year. \* day - A period of 24 hours. + deprecated: false + enum: + - day + - week + - month + - year + status: + type: string + description: | + Status of the coupon. \* expired - Cannot be applied to a subscription. A coupon may expire due to exceeding [max_redemptions](/docs/api/coupons?#coupon_max_redemptions) or [valid_till](/docs/api/coupons?#coupon_valid_till) date is past. Existing associations remain unaffected. \* archived - Cannot be applied to a subscription. Existing associations remain unaffected. \* active - Can be applied to a subscription. \* deleted - Indicates the coupon has been deleted. + deprecated: false + default: active + enum: + - active + - archived + item_constraints: + required: + - constraint + - item_type + type: object + properties: + constraint: + type: array + items: + type: string + description: | + Constraint applicable for the item \* specific - Coupon applicable to specific items. \* all - Coupon applicable to all items. \* criteria - Coupon applicable based on criteria. \* none - Coupon not applicable to any items. + deprecated: false + enum: + - none + - all + - specific + - criteria + item_type: + type: array + items: + type: string + description: | + Item type for which this criteria is applicable for. \* charge - Charge \* plan - Plan \* addon - Addon + deprecated: false + enum: + - plan + - addon + - charge + item_price_ids: + type: array + description: "List of item price ids for which this coupon is\ + \ applicable. \n\n**Note:**\n\n\nWhen specifying a value\ + \ for `item_price_ids`, make sure that the value is wrapped\ + \ in square brackets (`[]`), for example:\n`[cbdemo_advanced-USD-Daily]`\ + \ instead of `cbdemo_advanced-USD-Daily`; otherwise, a `param_wrong_value`\ + \ error returns.\n\n\n\nFor information about `item_price_ids`,\ + \ refer to *Defining Price Points* in [Plans](https://www.chargebee.com/docs/2.0/plans.html#defining-price-points-for-plan),\ + \ [Addons](https://www.chargebee.com/docs/2.0/addons.html#defining-price-points-for-an-addon),\n\ + and [Charges](https://www.chargebee.com/docs/2.0/charges.html#defining-price-points-for-a-charge).\n" + items: + type: array + deprecated: false + items: {} + description: | + Parameters for item_constraints + deprecated: false + item_constraint_criteria: + type: object + properties: + item_type: + type: array + items: + type: string + description: | + Item type for which this criteria is applicable for. \* charge - Charge is a type of item \* plan - Plan is a type of item \* addon - Addon is a type of item + deprecated: false + enum: + - plan + - addon + - charge + item_family_ids: + type: array + description: | + List of families for which this coupon is applicable. + items: + type: array + deprecated: false + items: {} + currencies: + type: array + description: | + List of currencies ([ISO 4217 format](https://www.chargebee.com/docs/supported-currencies.html)) for which this coupon is applicable. + items: + type: array + deprecated: false + items: {} + item_price_periods: + type: array + description: | + Pass the item price period units for this criterion. `period` followed by `period_units`. Such as `[1 day,1 week,3 month,6 month]` + items: + type: array + deprecated: false + items: {} + description: | + Parameters for item_constraint_criteria + deprecated: false + coupon_constraints: + required: + - entity_type + - type + type: object + properties: + entity_type: + type: array + items: + type: string + description: | + The resource type for the constraint. This, along with `type` and `value`, helps define the specific rule applied. \* customer - The constraint is based on `customer` records. + deprecated: false + enum: + - customer + type: + type: array + items: + type: string + description: | + The type of coupon constraint. \* unique_by - Indicates - when `entity_type` is `customer` - that the coupon can be redeemed only once for every unique value of a specified `customer` attribute. The `customer` attribute is specified using `value`. For example, if `value` is `email`, then the coupon can be redeemed only once for every unique value of `customer.email`. In other words, when there are multiple `customer` records with the same value for `email`, once the coupon has been redeemed for one of those customer records, no further redemptions of the coupon are allowed for any of those `customer` records. \* max_redemptions - The coupon can be redeemed up to a set number of times for a specific resource type. The maximum redemptions are specified using `value`, and the resource type is specified using `entity_type`. For example, if `entity_type` is `customer` and `value` is `10` then the coupon can only be redeemed up to 10 times for any particular `customer` record. + deprecated: false + enum: + - max_redemptions + - unique_by + value: + type: array + description: |+ + The value of the coupon constraint. The possible values depend on the value of `constraints[type]`: + + * When `type` is `unique_by`, then `value` can be `email` or `id`. + + * When `type` is `max_redemptions`, then `value` can be any integer in the range `1` `coupon.max_redemptions`, inclusive. + + items: + maxLength: 65000 + type: string + deprecated: false + description: | + Parameters for \`coupon_constraints\`. Multiple \`coupon_constraints\` can be passed by specifying unique indices. + deprecated: false + additionalProperties: true + encoding: + coupon_constraints: + style: deepObject + explode: true + item_constraint_criteria: + style: deepObject + explode: true + item_constraints: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - coupon + type: object + properties: + coupon: + $ref: '#/components/schemas/Coupon' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /coupon_sets: + get: + summary: List coupon sets + description: | + Use this API to get the list of all the coupon sets. + operationId: list_coupon_sets + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(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(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: id + in: query + description: "optional, string filter
Uniquely\ + \ identifies a coupon_set.
Supported operators : is, is_not, starts_with,\ + \ in, not_in

Example id[is]\ + \ = \"bulk-codes-1\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: bulk-codes-1 + deprecated: false + - name: name + in: query + description: "optional, string filter
Name\ + \ of the coupon set.
Supported operators : is, is_not, starts_with,\ + \ in, not_in

Example name[is_not]\ + \ = \"bulk-codes-1\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: bulk-codes-1 + deprecated: false + - name: coupon_id + in: query + description: "optional, string filter
Coupon\ + \ id linked to coupon set.
Supported operators : is, is_not, starts_with,\ + \ in, not_in

Example coupon_id[is]\ + \ = \"OFF2008\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: OFF2008 + deprecated: false + - name: total_count + in: query + description: "optional, integer filter
No\ + \ of coupon codes present in coupon set.
Supported operators : is,\ + \ is_not, lt, lte, gt, gte, between

Example total_count[gt] = \"10\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + example: "10" + deprecated: false + - name: redeemed_count + in: query + description: "optional, integer filter
No\ + \ of redeemed codes.
Supported operators : is, is_not, lt, lte,\ + \ gt, gte, between

Example \ + \ redeemed_count[is] = \"5\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + example: "5" + deprecated: false + - name: archived_count + in: query + description: "optional, integer filter
No\ + \ of archived codes.
Supported operators : is, is_not, lt, lte,\ + \ gt, gte, between

Example \ + \ archived_count[is] = \"2\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + example: "2" + deprecated: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - coupon_set + type: object + properties: + coupon_set: + $ref: '#/components/schemas/CouponSet' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + post: + summary: Create a coupon set + description: | + Create a coupon set with a coupon code compatible to your product offers and promotional discounts + operationId: create_a_coupon_set + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?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?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - coupon_id + - id + - name + type: object + properties: + coupon_id: + maxLength: 100 + type: string + description: | + Coupon id linked to coupon set. + deprecated: false + name: + maxLength: 50 + type: string + description: | + Name of the coupon set. + deprecated: false + id: + maxLength: 50 + type: string + description: | + Uniquely identifies a coupon_set. + deprecated: false + meta_data: + type: object + additionalProperties: true + description: | + A collection of key-value pairs that provides extra information about the coupon set. \*\*Note:\*\* There's a character limit of 65,535. \[Learn more\](advanced-features?prod_cat_ver=2#metadata). + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - coupon_set + type: object + properties: + coupon_set: + $ref: '#/components/schemas/CouponSet' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /coupon_sets/{coupon-set-id}/update: + post: + summary: Update a coupon set + description: | + Use this API to update a specific coupon set by updating its `name` and the `meta_data`. + operationId: update_a_coupon_set + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0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:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: coupon-set-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + name: + maxLength: 50 + type: string + description: | + Name of the coupon set. + deprecated: false + meta_data: + type: object + additionalProperties: true + description: | + A collection of key-value pairs that provides extra information about the coupon set. \*\*Note:\*\* There's a character limit of 65,535. \[Learn more\](advanced-features?prod_cat_ver=2#metadata). + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - coupon_set + type: object + properties: + coupon_set: + $ref: '#/components/schemas/CouponSet' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /coupon_sets/{coupon-set-id}: + get: + summary: Retrieve a coupon set + description: | + Use this API to retrieve a specific coupon set. + operationId: retrieve_a_coupon_set + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?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4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: coupon-set-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - coupon_set + type: object + properties: + coupon_set: + $ref: '#/components/schemas/CouponSet' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /coupon_sets/{coupon-set-id}/add_coupon_codes: + post: + summary: Add coupon codes to coupon set + description: | + This API add coupon codes to an existing coupon set. + operationId: add_coupon_codes_to_coupon_set + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0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{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: coupon-set-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + code: + type: array + description: | + You can pass up to 100 values per API call. You can also use the Chargebee UI to pass up to 1000 codes per operation. There is no limit on the total number of coupon codes that can be included in a coupon set. + deprecated: false + items: + maxLength: 50 + type: string + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - coupon_set + type: object + properties: + coupon_set: + $ref: '#/components/schemas/CouponSet' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /coupon_sets/{coupon-set-id}/delete_unused_coupon_codes: + post: + summary: Delete unused coupon codes + description: | + Use this API to delete all the unutilised coupon codes from a specific coupon set. + operationId: delete_unused_coupon_codes + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25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:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: coupon-set-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - coupon_set + type: object + properties: + coupon_set: + $ref: '#/components/schemas/CouponSet' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /coupon_sets/{coupon-set-id}/delete: + post: + summary: Delete a coupon set + description: | + Use this endpoint to delete a specific coupon set + operationId: delete_a_coupon_set + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa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-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: coupon-set-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - coupon_set + type: object + properties: + coupon_set: + $ref: '#/components/schemas/CouponSet' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /coupon_codes: + get: + summary: List coupon codes + description: | + List the available coupon codes. + operationId: list_coupon_codes + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[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1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: code + in: query + description: "optional, string filter
Unique\ + \ coupon code that can be redeemed only once.
Supported operators\ + \ : is, is_not, starts_with, in, not_in

Example code[is_not] = \"OFF2009\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: OFF2009 + deprecated: false + - name: coupon_id + in: query + description: "optional, string filter
Id\ + \ of the main coupon resource.
Supported operators : is, is_not,\ + \ starts_with, in, not_in

Example coupon_id[is] = \"OFF20\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: OFF20 + deprecated: false + - name: coupon_set_name + in: query + description: "optional, string filter
Coupon\ + \ set name to which this coupon code would be grouped under. If the coupon\ + \ set with the passed name is not present, a new coupon set will be created.
Supported\ + \ operators : is, is_not, starts_with

Example coupon_set_name[is_not] = \"OFF20\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + example: OFF20 + deprecated: false + - name: status + in: query + description: "optional, enumerated string filter
Status\ + \ of the coupon code. Possible values are : not_redeemed, redeemed,\ + \ archived.
Supported operators : is, is_not, in, not_in

Example\ + \ status[is] = \"redeemed\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`not_redeemed\` - Can be applied to a subscription. \* \`redeemed\` - Cannot be applied to a subscription as the coupon code has been already used. \* \`archived\` - Cannot be applied to a subscription as it has been made inactive. + enum: + - not_redeemed + - redeemed + - archived + is_not: + type: string + description: | + \* \`not_redeemed\` - Can be applied to a subscription. \* \`redeemed\` - Cannot be applied to a subscription as the coupon code has been already used. \* \`archived\` - Cannot be applied to a subscription as it has been made inactive. + enum: + - not_redeemed + - redeemed + - archived + in: + pattern: "^\\[(not_redeemed|redeemed|archived)(,(not_redeemed|redeemed|archived))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(not_redeemed|redeemed|archived)(,(not_redeemed|redeemed|archived))*\\\ + ]$" + type: string + example: redeemed + deprecated: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - coupon_code + type: object + properties: + coupon_code: + $ref: '#/components/schemas/CouponCode' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /coupon_codes/{coupon-code-code}: + get: + summary: Retrieve a coupon code + description: | + Retrieves a specific coupon code details. + operationId: retrieve_a_coupon_code + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(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2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: coupon-code-code + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - coupon_code + type: object + properties: + coupon_code: + $ref: '#/components/schemas/CouponCode' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /coupon_codes/{coupon-code-code}/archive: + post: + summary: Archive a coupon code + description: | + Archives a coupon code thereby making it inactive. The archived coupon code cannot be applied to any subscription. + operationId: archive_a_coupon_code + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]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a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: coupon-code-code + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - coupon_code + type: object + properties: + coupon_code: + $ref: '#/components/schemas/CouponCode' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /addresses: + get: + summary: Retrieve an address + description: | + Retrieves an address resource for a subscription and the specified label. + operationId: retrieve_an_address + parameters: + - name: subscription_id + in: query + description: "A unique and immutable identifier for the subscription. If not\ + \ provided, it is autogenerated." + required: true + deprecated: false + style: form + explode: true + schema: + maxLength: 50 + type: string + deprecated: false + - name: label + in: query + description: Label to identify the address. This is unique for all the address + for a subscription. + required: true + deprecated: false + style: form + explode: true + schema: + maxLength: 50 + type: string + deprecated: false + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1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?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - address + type: object + properties: + address: + $ref: '#/components/schemas/Address' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + post: + summary: Update an address + description: | + Adds or replaces the address for a subscription. If an address is already present for the specified label, it will be replaced otherwise new address is added with that label. + operationId: update_an_address + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?: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(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - label + - subscription_id + type: object + properties: + subscription_id: + maxLength: 50 + type: string + description: | + A unique and immutable identifier for the subscription. If not provided, it is autogenerated. + deprecated: false + label: + maxLength: 50 + type: string + description: | + Label to identify the address. This is unique for all the address for a subscription. + deprecated: false + first_name: + maxLength: 150 + type: string + description: | + First name. + deprecated: false + last_name: + maxLength: 150 + type: string + description: | + Last name. + deprecated: false + email: + maxLength: 70 + type: string + description: | + Email. + format: email + deprecated: false + company: + maxLength: 250 + type: string + description: | + Company name. + deprecated: false + phone: + maxLength: 50 + type: string + description: | + Phone number. + deprecated: false + addr: + maxLength: 150 + type: string + description: | + Address line 1. + deprecated: false + extended_addr: + maxLength: 150 + type: string + description: | + Address line 2. + deprecated: false + extended_addr2: + maxLength: 150 + type: string + description: | + Address line 3. + deprecated: false + city: + maxLength: 50 + type: string + description: | + Name of the city. + deprecated: false + state_code: + maxLength: 50 + type: string + description: | + The [ISO 3166-2 state/province code](https://www.iso.org/obp/ui/#search/code) without the country prefix. Currently supported for USA, Canada and India. For instance, for Arizona (USA), set `state_code` as `AZ` (not `US-AZ`). For Tamil Nadu (India), set as `TN` (not `IN-TN`). For British Columbia (Canada), set as `BC` (not `CA-BC`). + deprecated: false + state: + maxLength: 50 + type: string + description: | + The state/province name. Is set by Chargebee automatically for US, Canada and India If `state_code` is provided. + deprecated: false + zip: + maxLength: 20 + type: string + description: | + Zip or postal code. The number of characters is validated according to the rules [specified here](https://chromium-i18n.appspot.com/ssl-address). + deprecated: false + country: + maxLength: 50 + type: string + description: "The billing address country of the customer. Must\ + \ be one of [ISO 3166 alpha-2 country code](https://www.iso.org/iso-3166-country-codes.html).\ + \ \n\n**Note** : If you enter an invalid country code, the system\ + \ will return an error. \n\n**Brexit**\n\n\nIf you have enabled\ + \ [EU VAT](https://www.chargebee.com/docs/eu-vat.html) in 2021\ + \ or later, or have [manually enable](https://www.chargebee.com/docs/brexit.html#what-needs-to-be-done-in-chargebee)\ + \ the Brexit configuration, then `XI` (the code for **United Kingdom\ + \ -- Northern Ireland**) is available as an option.\n.\n" + deprecated: false + validation_status: + type: string + description: | + The address verification status. \* partially_valid - The address is valid for taxability but has not been validated for shipping. \* not_validated - Address is not yet validated. \* invalid - Address is invalid. \* valid - Address was validated successfully. + deprecated: false + default: not_validated + enum: + - not_validated + - valid + - partially_valid + - invalid + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - address + type: object + properties: + address: + $ref: '#/components/schemas/Address' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /usages/pdf: + post: + summary: Retrieve Usages for an Invoice as PDF + description: | + Retrieves usages record for an invoice in PDF file format. + operationId: retrieve_usages_for_an_invoice_as_pdf + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + disposition_type: + type: string + description: | + Determines the pdf should be rendered as inline or attachment in the browser. \* attachment - PDF is rendered as attachment in the browser \* inline - PDF is rendered as inline in the browser + deprecated: false + default: attachment + enum: + - attachment + - inline + invoice: + required: + - id + type: object + properties: + id: + maxLength: 50 + type: string + description: | + The invoice number. Acts as a identifier for invoice and typically generated sequentially. + deprecated: false + description: | + Parameters for invoice + deprecated: false + encoding: + invoice: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - download + type: object + properties: + download: + $ref: '#/components/schemas/Download' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/usages: + get: + summary: Retrieve a usage + description: | + Retrieves a usage record of a specific subscription. + operationId: retrieve_a_usage + parameters: + - name: id + in: query + description: "A unique and immutable id for the usage. If not provided, it\ + \ is autogenerated." + required: true + deprecated: false + style: form + explode: true + schema: + maxLength: 100 + type: string + deprecated: false + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(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])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - usage + type: object + properties: + usage: + $ref: '#/components/schemas/Usage' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + post: + summary: Create a usage + description: "Creates a usage record for an item price in a subscription. The\ + \ item price must belong to a [metered](/docs/api/items?prod_cat_ver=2#item_metered)\ + \ item. \n**Max Usages** \nThe maximum number of usages that can be recorded\ + \ for the entire lifetime of a subscription is 5000. [Contact Support](https://chargebee.freshdesk.com/support/home)\ + \ if you want this limit to be increased for your site.\n" + operationId: create_a_usage + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-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0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - item_price_id + - quantity + - usage_date + type: object + properties: + id: + maxLength: 100 + type: string + description: | + A unique and immutable id for the usage. If not provided, it is autogenerated. + deprecated: false + item_price_id: + maxLength: 100 + type: string + description: | + The id of the [item price](/docs/api/item_prices?prod_cat_ver=2) to which this usage belongs. The item price must be a part of the subscription or should have been part of it historically. + deprecated: false + quantity: + maxLength: 40 + type: string + description: | + The quantity specified for this usage record. + deprecated: false + usage_date: + pattern: "^[0-9]{10}$" + type: integer + description: "The time at which this usage occurred. Chargebee bills\ + \ only those usages whose `usage_date` falls within a time when\ + \ the subscription `status` was `active` or `non_renewing`. However,\ + \ the remaining usage records are still stored and are [retrievable](/docs/api/usages?prod_cat_ver=2#retrieve_a_usage).\ + \ \n**Note:** If `usage_date` corresponds to a time already\ + \ invoiced, then it is stored but never invoiced unless the [invoice\ + \ is regenerated](/docs/api/subscriptions?prod_cat_ver=2#regenerate_an_invoice).\n" + format: unix-time + deprecated: false + note: + maxLength: 500 + type: string + description: | + A note for this usage record. This note is not displayed on any customer-facing document or interface such as [invoice PDFs](/docs/api/invoices?prod_cat_ver=2#retrieve_invoice_as_pdf) or [Hosted Pages](/docs/api/hosted_pages?prod_cat_ver=2). + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - usage + type: object + properties: + usage: + $ref: '#/components/schemas/Usage' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /subscriptions/{subscription-id}/delete_usage: + post: + summary: Delete a usage + description: | + Deletes a usage record. This operation cannot be invoked for a usage record that has been [invoiced](usages?prod_cat_ver=2#invoicing_usages). + operationId: delete_a_usage + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-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-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: subscription-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - id + type: object + properties: + id: + maxLength: 100 + type: string + description: | + A unique and immutable id for the usage. If not provided, it is autogenerated. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - usage + type: object + properties: + usage: + $ref: '#/components/schemas/Usage' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /usages: + get: + summary: List usages + description: | + Retrieves the list of usages. + operationId: list_usages + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?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-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: id + in: query + description: "optional, string filter
A\ + \ unique and immutable id for the usage. If not provided, it is autogenerated.
Supported\ + \ operators : is, is_not, starts_with

Example id[is] = \"usage_lsfja24411\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + example: usage_lsfja24411 + deprecated: false + - name: subscription_id + in: query + description: "optional, string filter
The\ + \ id of the subscription\ + \ to which this usage record belongs.
Supported operators : is,\ + \ is_not, starts_with

Example →\ + subscription_id[is] = \"active2\"" + required: true + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + example: active2 + deprecated: false + - name: usage_date + in: query + description: |- + optional, timestamp(UTC) in seconds filter
The time at which this usage occurred. Chargebee bills only those usages whose + usage_date falls within a time when the subscription status was active or non_renewing. However, the remaining usage records are still stored and are + retrievable.
Note: If usage_date corresponds to a time already invoiced, then it is stored but never invoiced unless the invoice is regenerated.
Supported operators : after, before, on, between

Example usage_date[after] = "1601220958" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1601220958" + deprecated: false + - name: item_price_id + in: query + description: "optional, string filter
The\ + \ id of the item price\ + \ to which this usage belongs. The item price must be a part of the subscription\ + \ or should have been part of it historically.
Supported operators\ + \ : is, is_not, starts_with

Example item_price_id[is] = \"sprout\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + example: sprout + deprecated: false + - name: invoice_id + in: query + description: "optional, string filter
When\ + \ the usage has been invoiced, this is the id of the invoice. This is cleared when the\ + \ invoice is voided or deleted.
Supported operators :\ + \ is, is_not, starts_with, is_present

Example invoice_id[is] = \"null\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + deprecated: false + example: null + - name: source + in: query + description: "optional, enumerated string filter
The\ + \ source from which the usage record was created. Possible values are :\ + \ admin_console, api, bulk_operation.
Supported operators\ + \ : is, is_not, in, not_in

Example source[is] = \"api\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`admin_console\` - Operation made through the Chargebee admin UI \* \`api\` - Operation made through the API \* \`bulk_operation\` - Operation that are triggerd through bulk operation. + enum: + - admin_console + - api + - bulk_operation + is_not: + type: string + description: | + \* \`admin_console\` - Operation made through the Chargebee admin UI \* \`api\` - Operation made through the API \* \`bulk_operation\` - Operation that are triggerd through bulk operation. + enum: + - admin_console + - api + - bulk_operation + in: + pattern: "^\\[(admin_console|api|bulk_operation)(,(admin_console|api|bulk_operation))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(admin_console|api|bulk_operation)(,(admin_console|api|bulk_operation))*\\\ + ]$" + type: string + example: api + deprecated: false + - name: sort_by + in: query + description: "optional, string filter
Sorts\ + \ based on the specified attribute.
Supported attributes : usage_date
Supported\ + \ sort-orders : asc, desc

Example sort_by[asc] = \"usage_date\"
This\ + \ will sort the result based on the 'usage_date' attribute in ascending(earliest\ + \ first) order." + required: false + style: deepObject + explode: true + schema: + minProperties: 1 + type: object + properties: + asc: + type: string + enum: + - usage_date + desc: + type: string + enum: + - usage_date + additionalProperties: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - usage + type: object + properties: + usage: + $ref: '#/components/schemas/Usage' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /events: + get: + summary: List events + description: |+ + Retrieves list of events. + + operationId: list_events + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(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9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: id + in: query + description: "optional, string filter
Uniquely\ + \ identifies a event.
Supported operators : is, is_not, starts_with,\ + \ in, not_in

Example id[is]\ + \ = \"8ndk0hbKm\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: 8ndk0hbKm + deprecated: false + - name: webhook_status + in: query + description: "optional, enumerated string filter
Returns\ + \ the events (occurred in the past 6 days) which has this status in any\ + \ of the events' webhooks.
Note : To retrieve events which\ + \ have occurred before the 6 day period, use the occurred_at(start_time/end_time)\ + \ attribute. Possible values are : not_configured, scheduled, succeeded,\ + \ re_scheduled, failed, skipped, not_applicable.
Supported operators\ + \ : is, is_not, in, not_in

Example webhook_status[is] = \"succeeded\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`not_configured\` - Webhook was not configured when this event occurred \* \`scheduled\` - Webhook call has been scheduled. \* \`succeeded\` - Webhook call was successful. \* \`re_scheduled\` - Webhook call has been rescheduled due failure(s) in previous call(s) \* \`failed\` - Webhook call has been suspended after the all retries have resulted in failure. \* \`skipped\` - Skipped as specified in request \* \`not_applicable\` - Webhook call is not applicable for this event. + enum: + - not_configured + - scheduled + - succeeded + - re_scheduled + - failed + - skipped + - not_applicable + is_not: + type: string + description: | + \* \`not_configured\` - Webhook was not configured when this event occurred \* \`scheduled\` - Webhook call has been scheduled. \* \`succeeded\` - Webhook call was successful. \* \`re_scheduled\` - Webhook call has been rescheduled due failure(s) in previous call(s) \* \`failed\` - Webhook call has been suspended after the all retries have resulted in failure. \* \`skipped\` - Skipped as specified in request \* \`not_applicable\` - Webhook call is not applicable for this event. + enum: + - not_configured + - scheduled + - succeeded + - re_scheduled + - failed + - skipped + - not_applicable + in: + pattern: "^\\[(not_configured|scheduled|succeeded|re_scheduled|failed|skipped|not_applicable)(,(not_configured|scheduled|succeeded|re_scheduled|failed|skipped|not_applicable))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(not_configured|scheduled|succeeded|re_scheduled|failed|skipped|not_applicable)(,(not_configured|scheduled|succeeded|re_scheduled|failed|skipped|not_applicable))*\\\ + ]$" + type: string + example: succeeded + deprecated: false + - name: event_type + in: query + description: "optional, enumerated string filter
Specify\ + \ it if you need to fetch events of a particular type. Possible values are\ + \ : coupon_created, coupon_updated, coupon_deleted, coupon_set_created,\ + \ coupon_set_updated, coupon_set_deleted, coupon_codes_added, coupon_codes_deleted,\ + \ coupon_codes_updated, customer_created, customer_changed, customer_deleted,\ + \ customer_moved_out, customer_moved_in, promotional_credits_added, promotional_credits_deducted,\ + \ subscription_created, subscription_created_with_backdating, subscription_started,\ + \ subscription_trial_end_reminder, subscription_activated, subscription_activated_with_backdating,\ + \ subscription_changed, mrr_updated, subscription_changed_with_backdating,\ + \ subscription_cancellation_scheduled, subscription_cancellation_reminder,\ + \ subscription_cancelled, subscription_canceled_with_backdating, subscription_reactivated,\ + \ subscription_reactivated_with_backdating, subscription_renewed, subscription_scheduled_cancellation_removed,\ + \ subscription_changes_scheduled, subscription_scheduled_changes_removed,\ + \ subscription_shipping_address_updated, subscription_deleted, subscription_paused,\ + \ subscription_pause_scheduled, subscription_scheduled_pause_removed, subscription_resumed,\ + \ subscription_resumption_scheduled, subscription_scheduled_resumption_removed,\ + \ subscription_advance_invoice_schedule_added, subscription_advance_invoice_schedule_updated,\ + \ subscription_advance_invoice_schedule_removed, pending_invoice_created,\ + \ pending_invoice_updated, invoice_generated, invoice_generated_with_backdating,\ + \ invoice_updated, invoice_deleted, credit_note_created, credit_note_created_with_backdating,\ + \ credit_note_updated, credit_note_deleted, subscription_renewal_reminder,\ + \ add_usages_reminder, transaction_created, transaction_updated, transaction_deleted,\ + \ payment_succeeded, payment_failed, payment_refunded, payment_initiated,\ + \ refund_initiated, authorization_succeeded, authorization_voided, card_added,\ + \ card_updated, card_expiry_reminder, card_expired, card_deleted, payment_source_added,\ + \ payment_source_updated, payment_source_deleted, payment_source_expiring,\ + \ payment_source_expired, virtual_bank_account_added, virtual_bank_account_updated,\ + \ virtual_bank_account_deleted, token_created, token_consumed, token_expired,\ + \ unbilled_charges_created, unbilled_charges_voided, unbilled_charges_deleted,\ + \ unbilled_charges_invoiced, order_created, order_updated, order_cancelled,\ + \ order_delivered, order_returned, order_ready_to_process, order_ready_to_ship,\ + \ order_deleted, order_resent, quote_created, quote_updated, quote_deleted,\ + \ tax_withheld_recorded, tax_withheld_deleted, tax_withheld_refunded, gift_scheduled,\ + \ gift_unclaimed, gift_claimed, gift_expired, gift_cancelled, gift_updated,\ + \ hierarchy_created, hierarchy_deleted, payment_intent_created, payment_intent_updated,\ + \ contract_term_created, contract_term_renewed, contract_term_terminated,\ + \ contract_term_completed, contract_term_cancelled, item_family_created,\ + \ item_family_updated, item_family_deleted, item_created, item_updated,\ + \ item_deleted, item_price_created, item_price_updated, item_price_deleted,\ + \ attached_item_created, attached_item_updated, attached_item_deleted, differential_price_created,\ + \ differential_price_updated, differential_price_deleted, feature_created,\ + \ feature_updated, feature_deleted, feature_activated, feature_reactivated,\ + \ feature_archived, item_entitlements_updated, entitlement_overrides_updated,\ + \ entitlement_overrides_removed, item_entitlements_removed, entitlement_overrides_auto_removed,\ + \ business_entity_created, business_entity_updated, business_entity_deleted,\ + \ purchase_created.
Supported operators : is, is_not, in,\ + \ not_in

Example event_type[is]\ + \ = \"customer_created\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`coupon_created\` - Sent when a coupon is created. \* \`coupon_updated\` - Sent when a coupon is changed. \* \`coupon_deleted\` - Sent when a coupon is deleted. \* \`coupon_set_created\` - Sent when a coupon set is created \* \`coupon_set_updated\` - Sent when a coupon set is changed \* \`coupon_set_deleted\` - Sent when a coupon set is deleted \* \`coupon_codes_added\` - Sent when coupon codes are added in coupon set \* \`coupon_codes_deleted\` - Sent when coupon codes are deleted in coupon set \* \`coupon_codes_updated\` - Sent when coupon codes are updated \* \`customer_created\` - Sent when a customer is created. This event happens when only a new customer is created or when a customer is automatically created during new subscription creation. \* \`customer_changed\` - Sent when a customer is changed \* \`customer_deleted\` - Sent when a customer is deleted \* \`customer_moved_out\` - Sent when a customer is copied to another site \* \`customer_moved_in\` - Sent when a customer is copied from another site \* \`promotional_credits_added\` - Sent when a customer prmotion credits added \* \`promotional_credits_deducted\` - Sent when a customer prmotion credits deducted \* \`subscription_created\` - Sent when a new subscription is created. \* \`subscription_created_with_backdating\` - Sent when a new subscription is created with backdating. \* \`subscription_started\` - Sent when a 'future' subscription gets started at the scheduled date. \* \`subscription_trial_end_reminder\` - Sent when the customer's trial period is about to end. \* \`subscription_activated\` - Sent after the subscription has been moved from trial to active state \* \`subscription_activated_with_backdating\` - Sent after the subscription changes to \`active\` from another \`status\`, while the change is backdated. \* \`subscription_changed\` - Sent after the subscription's recurring items have been changed \* \`subscription_trial_extended\` - Trial Extension \* \`mrr_updated\` - Sent when either of MRR or CMRR of a subscription changes \* \`subscription_changed_with_backdating\` - Sent after the subscription's recurring items have been changed with backdated date \* \`subscription_cancellation_scheduled\` - Sent when subscription is scheduled to cancel at end of current term \* \`subscription_cancellation_reminder\` - Sent when the customer's subscription is nearing it's scheduled cancellation date. \* \`subscription_cancelled\` - Sent when the subscription gets cancelled. If cancelled due to non payment or card not present, the subscription will have the possible reason as 'cancel_reason'. \* \`subscription_canceled_with_backdating\` - Sent when the subscription gets cancelled. If cancelled due to non payment or card not present, the subscription will have the possible reason as 'cancel_reason'. \* \`subscription_reactivated\` - Sent when the subscription is moved from cancelled state to active or in_trial state \* \`subscription_reactivated_with_backdating\` - Sent when the subscription is moved from cancelled state to active or in_trial state with past date \* \`subscription_renewed\` - Sent when the subscription is renewed from the current term. \* \`subscription_scheduled_cancellation_removed\` - Sent when scheduled cancellation is removed for the subscription. \* \`subscription_changes_scheduled\` - Sent when subscription changes are scheduled for later. Changes will be applied at the end of current term. \* \`subscription_scheduled_changes_removed\` - Sent when scheduled change for the subscription is removed. \* \`subscription_shipping_address_updated\` - Triggered when shipping address is added or updated for a subscription. \* \`subscription_deleted\` - Sent when a subscription has been deleted \* \`subscription_paused\` - Sent when the subscription is paused. \* \`subscription_pause_scheduled\` - Sent when the subscription is scheduled to pause. \* \`subscription_scheduled_pause_removed\` - Triggered when scheduled pause is removed for the subscription. \* \`subscription_resumed\` - Sent when the subscription is moved from paused state to active state \* \`subscription_resumption_scheduled\` - Triggered when the subscription resumption is scheduled. \* \`subscription_scheduled_resumption_removed\` - Triggered when scheduled resumption is removed for the subscription. \* \`subscription_advance_invoice_schedule_added\` - Triggered when advance invoice is scheduled for a subscription. \* \`subscription_advance_invoice_schedule_updated\` - Triggered when scheduled advance invoice is updated for a subscription. \* \`subscription_advance_invoice_schedule_removed\` - Triggered when scheduled advance invoice is removed for a subscription. \* \`pending_invoice_created\` - Event triggered (in the case of metered billing) when a "Pending" invoice is created that has usage related charges or line items to be added, before being closed. This is triggered only when the "Notify for Pending Invoices" option is enabled. \* \`pending_invoice_updated\` - Event triggered when the option "Notify and wait to close invoices" is enabled, and the 'Pending' invoice is updated. \* \`invoice_generated\` - Event triggered when a new invoice is generated. In case of metered billing, this event is triggered when a "Pending" invoice is closed. \* \`invoice_generated_with_backdating\` - Event triggered when a new invoice is generated with past date as invoice date. \* \`invoice_updated\` - Triggered when the invoice's shipping/billing address is updated, if the invoice is voided, or when the amount due is modified due to payments applied/removed. \* \`invoice_deleted\` - Event triggered when an invoice is deleted. \* \`credit_note_created\` - Sent when a credit note is created \* \`credit_note_created_with_backdating\` - Sent when a credit note is created with past date as credit note date \* \`credit_note_updated\` - Sent when a credit note is updated \* \`credit_note_deleted\` - Sent when a credit note is deleted \* \`invoice_installments_created\` - Event triggered when new installments are created for an invoice \* \`invoice_installment_updated\` - Event triggered when an installment is updated \* \`installment_config_created\` - Event triggered when a new installment config is created \* \`installment_config_deleted\` - Event triggered when an installment config is deleted \* \`subscription_renewal_reminder\` - Sent before each subscription's renewal based on plan's period \* \`add_usages_reminder\` - Sent every month day before renewal date of plan's period \* \`transaction_created\` - Triggered when a transaction is recorded \* \`transaction_updated\` - Triggered when a transaction is updated. E.g. (1) When a transaction is removed, (2) or when an excess payment is applied on an invoice, (3) or when amount_capturable gets updated. \* \`transaction_deleted\` - Triggered when a transaction is deleted. \* \`payment_succeeded\` - Sent when the payment is successfully collected \* \`payment_failed\` - Sent when attempt to charge customer's credit card fails \* \`payment_refunded\` - Sent when a payment refund is made \* \`payment_initiated\` - Sent when a payment is initiated via direct debit \* \`refund_initiated\` - Sent when a refund is initiated via direct debit \* \`netd_payment_due_reminder\` - \*\*(Deprecated)\*\* Sent when a invoice's due period is about to end \* \`authorization_succeeded\` - Triggered when a authorization transaction is created. \* \`authorization_voided\` - Triggered when a authorization transaction is voided. Authorization can be voided either manually or when blocked funds are released by the gateway after a certain period of time. \* \`card_added\` - Sent when a card is added for a customer. \* \`card_updated\` - Sent when the card is updated for a customer. \* \`card_expiry_reminder\` - Sent when the customer's credit card is expiring soon. Sent 30 days before the expiry date. \* \`card_expired\` - Sent when a card for a customer is expired \* \`card_deleted\` - Sent when a card is deleted for a customer \* \`payment_source_added\` - Sent when a payment source is added for a customer. \* \`payment_source_updated\` - Sent when the payment source is updated for a customer or when role is assigned to the payment source. \* \`payment_source_deleted\` - Sent when a payment source is deleted for a customer \* \`payment_source_expiring\` - Sent when the customer's payment source is expiring soon. Sent 30 days before the expiry date. \* \`payment_source_expired\` - Sent when a payment source for a customer is expired \* \`payment_source_locally_deleted\` - Sent when a payment source for a customer removed from Chargebee \* \`virtual_bank_account_added\` - Sent when a virtual bank account is added for a customer. \* \`virtual_bank_account_updated\` - Sent when the virtual bank account is updated for a customer. \* \`virtual_bank_account_deleted\` - Sent when a virtual bank account is deleted for a customer. \* \`token_created\` - Sent when a Token is created \* \`token_consumed\` - Sent when a Token is consumed \* \`token_expired\` - Sent when a Token is expired \* \`unbilled_charges_created\` - Triggered when unbilled charges are created \* \`unbilled_charges_voided\` - Triggered when unbilled charges are voided \* \`unbilled_charges_deleted\` - Triggered when unbilled charges are deleted \* \`unbilled_charges_invoiced\` - Triggered when unbilled charges are invoiced \* \`order_created\` - Triggered when order is created \* \`order_updated\` - Triggered when order is updated \* \`order_cancelled\` - Triggered when order is cancelled \* \`order_delivered\` - Triggered when order is marked as delivered \* \`order_returned\` - Triggered when order is marked as returned \* \`order_ready_to_process\` - Triggered when order reaches it's order date \* \`order_ready_to_ship\` - Triggered when order reaches it's shipping date \* \`order_deleted\` - Triggered when order is deleted \* \`order_resent\` - Triggered when order is resent \* \`quote_created\` - Triggered when quote is created \* \`quote_updated\` - Triggered when quote is updated \* \`quote_deleted\` - Triggered when quote is deleted \* \`tax_withheld_recorded\` - Triggered when a tax withheld is recorded for an invoice \* \`tax_withheld_deleted\` - Triggered when a tax withheld is deleted \* \`tax_withheld_refunded\` - Sent when a tax withheld refund is made \* \`gift_scheduled\` - Triggered when a new gift is created \* \`gift_unclaimed\` - Triggered when a new gift is unclaimed and is ready to be claimed \* \`gift_claimed\` - Triggered when a gift is claimed \* \`gift_expired\` - Triggered when a gift expires \* \`gift_cancelled\` - Triggered when a gift is cancelled. \* \`gift_updated\` - Triggered when a gift is updated \* \`hierarchy_created\` - Triggered when a hierarchy is created \* \`hierarchy_deleted\` - Triggered when a hierarchy is deleted \* \`payment_intent_created\` - Sent when a Payment intent is created \* \`payment_intent_updated\` - Sent when a Payment intent is updated \* \`contract_term_created\` - Triggered when new contract term is created \* \`contract_term_renewed\` - Triggered when new contract term is renewed \* \`contract_term_terminated\` - Triggered when contract term is terminated \* \`contract_term_completed\` - Triggered when contract term is completed \* \`contract_term_cancelled\` - Triggered when contract term is cancelled \* \`item_family_created\` - Triggered when an item family is created \* \`item_family_updated\` - Triggered when an item family is updated \* \`item_family_deleted\` - Triggered when an item family is deleted \* \`item_created\` - Triggered when an item is created \* \`item_updated\` - Triggered when an item is updated \* \`item_deleted\` - Triggered when an item is deleted \* \`item_price_created\` - Triggered when an item price is created \* \`item_price_updated\` - Triggered when an item price is updated \* \`item_price_deleted\` - Triggered when an item price is deleted \* \`attached_item_created\` - Triggered when an Attached item is created \* \`attached_item_updated\` - Triggered when an Attached item is updated \* \`attached_item_deleted\` - Triggered when an Attached item is deleted \* \`differential_price_created\` - Triggered when a differential price is created \* \`differential_price_updated\` - Triggered when a differential price is updated \* \`differential_price_deleted\` - Triggered when a differential price is deleted \* \`feature_created\` - Triggered when a feature is created. \* \`feature_updated\` - Triggered when an feature is updated \* \`feature_deleted\` - Triggered when a feature is deleted \* \`feature_activated\` - Triggered when a feature \`status\` transitions to \`active\` for the first time. \* \`feature_reactivated\` - Triggered when a feature \`status\` transitions to \`active\` for the second time or more. \* \`feature_archived\` - Triggered when an feature is archived \* \`item_entitlements_updated\` - Triggered when item entitlements are updated to a feature \* \`entitlement_overrides_updated\` - Triggered when an override entitlement is updated \* \`entitlement_overrides_removed\` - Triggered when an override entitlement is removed \* \`item_entitlements_removed\` - Triggered when item entitlements are removed for a feature \* \`entitlement_overrides_auto_removed\` - Triggered when Subscription entitlements overrides for a feature are auto removed after expiry \* \`subscription_entitlements_created\` - Triggered when subscription entitlements are created for a new subscription \* \`business_entity_created\` - Sent when a business entity is created. \* \`business_entity_updated\` - Sent when a business entity is updated. \* \`business_entity_deleted\` - Sent when a business entity is deleted. \* \`customer_business_entity_changed\` - Sent when a customer's business entity is changed. \* \`subscription_business_entity_changed\` - Sent when a subscription's business entity is changed. \* \`purchase_created\` - Triggered when purchase action is completed successfully \* \`voucher_created\` - Triggered when a payment voucher is created \* \`voucher_expired\` - Triggered when a payment voucher is expired \* \`voucher_create_failed\` - Triggered when a payment voucher creation is failed \* \`product_created\` - \*\*(Deprecated)\*\* Triggered when the product create is completed successfully \* \`product_updated\` - \*\*(Deprecated)\*\* Triggered when the product update is completed successfully \* \`product_deleted\` - \*\*(Deprecated)\*\* Triggered when the product delete is completed successfully \* \`variant_created\` - \*\*(Deprecated)\*\* Triggered when product variant create completed successfully \* \`variant_updated\` - \*\*(Deprecated)\*\* Triggered when product variant update completed successfully \* \`variant_deleted\` - \*\*(Deprecated)\*\* Triggered when product variant delete completed successfully \* \`item_price_entitlements_updated\` - Triggered when item Price entitlements are updated to a feature \* \`item_price_entitlements_removed\` - Triggered when item price entitlements are removed for a feature \* \`ramp_created\` - Triggered when a subscription ramp is created. \* \`ramp_deleted\` - Triggered when a subscription ramp is deleted. \* \`ramp_applied\` - Triggered when a subscription ramp is applied. \* \`price_variant_created\` - Triggered when a price variant is created. \* \`price_variant_updated\` - Triggered when a price variant is updated. \* \`price_variant_deleted\` - Triggered when a price variant is deleted. + enum: + - coupon_created + - coupon_updated + - coupon_deleted + - coupon_set_created + - coupon_set_updated + - coupon_set_deleted + - coupon_codes_added + - coupon_codes_deleted + - coupon_codes_updated + - customer_created + - customer_changed + - customer_deleted + - customer_moved_out + - customer_moved_in + - promotional_credits_added + - promotional_credits_deducted + - subscription_created + - subscription_created_with_backdating + - subscription_started + - subscription_trial_end_reminder + - subscription_activated + - subscription_activated_with_backdating + - subscription_changed + - subscription_trial_extended + - mrr_updated + - subscription_changed_with_backdating + - subscription_cancellation_scheduled + - subscription_cancellation_reminder + - subscription_cancelled + - subscription_canceled_with_backdating + - subscription_reactivated + - subscription_reactivated_with_backdating + - subscription_renewed + - subscription_scheduled_cancellation_removed + - subscription_changes_scheduled + - subscription_scheduled_changes_removed + - subscription_shipping_address_updated + - subscription_deleted + - subscription_paused + - subscription_pause_scheduled + - subscription_scheduled_pause_removed + - subscription_resumed + - subscription_resumption_scheduled + - subscription_scheduled_resumption_removed + - subscription_advance_invoice_schedule_added + - subscription_advance_invoice_schedule_updated + - subscription_advance_invoice_schedule_removed + - pending_invoice_created + - pending_invoice_updated + - invoice_generated + - invoice_generated_with_backdating + - invoice_updated + - invoice_deleted + - credit_note_created + - credit_note_created_with_backdating + - credit_note_updated + - credit_note_deleted + - invoice_installments_created + - invoice_installment_updated + - installment_config_created + - installment_config_deleted + - subscription_renewal_reminder + - add_usages_reminder + - transaction_created + - transaction_updated + - transaction_deleted + - payment_succeeded + - payment_failed + - payment_refunded + - payment_initiated + - refund_initiated + - authorization_succeeded + - authorization_voided + - card_added + - card_updated + - card_expiry_reminder + - card_expired + - card_deleted + - payment_source_added + - payment_source_updated + - payment_source_deleted + - payment_source_expiring + - payment_source_expired + - payment_source_locally_deleted + - virtual_bank_account_added + - virtual_bank_account_updated + - virtual_bank_account_deleted + - token_created + - token_consumed + - token_expired + - unbilled_charges_created + - unbilled_charges_voided + - unbilled_charges_deleted + - unbilled_charges_invoiced + - order_created + - order_updated + - order_cancelled + - order_delivered + - order_returned + - order_ready_to_process + - order_ready_to_ship + - order_deleted + - order_resent + - quote_created + - quote_updated + - quote_deleted + - tax_withheld_recorded + - tax_withheld_deleted + - tax_withheld_refunded + - gift_scheduled + - gift_unclaimed + - gift_claimed + - gift_expired + - gift_cancelled + - gift_updated + - hierarchy_created + - hierarchy_deleted + - payment_intent_created + - payment_intent_updated + - contract_term_created + - contract_term_renewed + - contract_term_terminated + - contract_term_completed + - contract_term_cancelled + - item_family_created + - item_family_updated + - item_family_deleted + - item_created + - item_updated + - item_deleted + - item_price_created + - item_price_updated + - item_price_deleted + - attached_item_created + - attached_item_updated + - attached_item_deleted + - differential_price_created + - differential_price_updated + - differential_price_deleted + - feature_created + - feature_updated + - feature_deleted + - feature_activated + - feature_reactivated + - feature_archived + - item_entitlements_updated + - entitlement_overrides_updated + - entitlement_overrides_removed + - item_entitlements_removed + - entitlement_overrides_auto_removed + - subscription_entitlements_created + - business_entity_created + - business_entity_updated + - business_entity_deleted + - customer_business_entity_changed + - subscription_business_entity_changed + - purchase_created + - voucher_created + - voucher_expired + - voucher_create_failed + - item_price_entitlements_updated + - item_price_entitlements_removed + - ramp_created + - ramp_deleted + - ramp_applied + - price_variant_created + - price_variant_updated + - price_variant_deleted + is_not: + type: string + description: | + \* \`coupon_created\` - Sent when a coupon is created. \* \`coupon_updated\` - Sent when a coupon is changed. \* \`coupon_deleted\` - Sent when a coupon is deleted. \* \`coupon_set_created\` - Sent when a coupon set is created \* \`coupon_set_updated\` - Sent when a coupon set is changed \* \`coupon_set_deleted\` - Sent when a coupon set is deleted \* \`coupon_codes_added\` - Sent when coupon codes are added in coupon set \* \`coupon_codes_deleted\` - Sent when coupon codes are deleted in coupon set \* \`coupon_codes_updated\` - Sent when coupon codes are updated \* \`customer_created\` - Sent when a customer is created. This event happens when only a new customer is created or when a customer is automatically created during new subscription creation. \* \`customer_changed\` - Sent when a customer is changed \* \`customer_deleted\` - Sent when a customer is deleted \* \`customer_moved_out\` - Sent when a customer is copied to another site \* \`customer_moved_in\` - Sent when a customer is copied from another site \* \`promotional_credits_added\` - Sent when a customer prmotion credits added \* \`promotional_credits_deducted\` - Sent when a customer prmotion credits deducted \* \`subscription_created\` - Sent when a new subscription is created. \* \`subscription_created_with_backdating\` - Sent when a new subscription is created with backdating. \* \`subscription_started\` - Sent when a 'future' subscription gets started at the scheduled date. \* \`subscription_trial_end_reminder\` - Sent when the customer's trial period is about to end. \* \`subscription_activated\` - Sent after the subscription has been moved from trial to active state \* \`subscription_activated_with_backdating\` - Sent after the subscription changes to \`active\` from another \`status\`, while the change is backdated. \* \`subscription_changed\` - Sent after the subscription's recurring items have been changed \* \`subscription_trial_extended\` - Trial Extension \* \`mrr_updated\` - Sent when either of MRR or CMRR of a subscription changes \* \`subscription_changed_with_backdating\` - Sent after the subscription's recurring items have been changed with backdated date \* \`subscription_cancellation_scheduled\` - Sent when subscription is scheduled to cancel at end of current term \* \`subscription_cancellation_reminder\` - Sent when the customer's subscription is nearing it's scheduled cancellation date. \* \`subscription_cancelled\` - Sent when the subscription gets cancelled. If cancelled due to non payment or card not present, the subscription will have the possible reason as 'cancel_reason'. \* \`subscription_canceled_with_backdating\` - Sent when the subscription gets cancelled. If cancelled due to non payment or card not present, the subscription will have the possible reason as 'cancel_reason'. \* \`subscription_reactivated\` - Sent when the subscription is moved from cancelled state to active or in_trial state \* \`subscription_reactivated_with_backdating\` - Sent when the subscription is moved from cancelled state to active or in_trial state with past date \* \`subscription_renewed\` - Sent when the subscription is renewed from the current term. \* \`subscription_scheduled_cancellation_removed\` - Sent when scheduled cancellation is removed for the subscription. \* \`subscription_changes_scheduled\` - Sent when subscription changes are scheduled for later. Changes will be applied at the end of current term. \* \`subscription_scheduled_changes_removed\` - Sent when scheduled change for the subscription is removed. \* \`subscription_shipping_address_updated\` - Triggered when shipping address is added or updated for a subscription. \* \`subscription_deleted\` - Sent when a subscription has been deleted \* \`subscription_paused\` - Sent when the subscription is paused. \* \`subscription_pause_scheduled\` - Sent when the subscription is scheduled to pause. \* \`subscription_scheduled_pause_removed\` - Triggered when scheduled pause is removed for the subscription. \* \`subscription_resumed\` - Sent when the subscription is moved from paused state to active state \* \`subscription_resumption_scheduled\` - Triggered when the subscription resumption is scheduled. \* \`subscription_scheduled_resumption_removed\` - Triggered when scheduled resumption is removed for the subscription. \* \`subscription_advance_invoice_schedule_added\` - Triggered when advance invoice is scheduled for a subscription. \* \`subscription_advance_invoice_schedule_updated\` - Triggered when scheduled advance invoice is updated for a subscription. \* \`subscription_advance_invoice_schedule_removed\` - Triggered when scheduled advance invoice is removed for a subscription. \* \`pending_invoice_created\` - Event triggered (in the case of metered billing) when a "Pending" invoice is created that has usage related charges or line items to be added, before being closed. This is triggered only when the "Notify for Pending Invoices" option is enabled. \* \`pending_invoice_updated\` - Event triggered when the option "Notify and wait to close invoices" is enabled, and the 'Pending' invoice is updated. \* \`invoice_generated\` - Event triggered when a new invoice is generated. In case of metered billing, this event is triggered when a "Pending" invoice is closed. \* \`invoice_generated_with_backdating\` - Event triggered when a new invoice is generated with past date as invoice date. \* \`invoice_updated\` - Triggered when the invoice's shipping/billing address is updated, if the invoice is voided, or when the amount due is modified due to payments applied/removed. \* \`invoice_deleted\` - Event triggered when an invoice is deleted. \* \`credit_note_created\` - Sent when a credit note is created \* \`credit_note_created_with_backdating\` - Sent when a credit note is created with past date as credit note date \* \`credit_note_updated\` - Sent when a credit note is updated \* \`credit_note_deleted\` - Sent when a credit note is deleted \* \`invoice_installments_created\` - Event triggered when new installments are created for an invoice \* \`invoice_installment_updated\` - Event triggered when an installment is updated \* \`installment_config_created\` - Event triggered when a new installment config is created \* \`installment_config_deleted\` - Event triggered when an installment config is deleted \* \`subscription_renewal_reminder\` - Sent before each subscription's renewal based on plan's period \* \`add_usages_reminder\` - Sent every month day before renewal date of plan's period \* \`transaction_created\` - Triggered when a transaction is recorded \* \`transaction_updated\` - Triggered when a transaction is updated. E.g. (1) When a transaction is removed, (2) or when an excess payment is applied on an invoice, (3) or when amount_capturable gets updated. \* \`transaction_deleted\` - Triggered when a transaction is deleted. \* \`payment_succeeded\` - Sent when the payment is successfully collected \* \`payment_failed\` - Sent when attempt to charge customer's credit card fails \* \`payment_refunded\` - Sent when a payment refund is made \* \`payment_initiated\` - Sent when a payment is initiated via direct debit \* \`refund_initiated\` - Sent when a refund is initiated via direct debit \* \`netd_payment_due_reminder\` - \*\*(Deprecated)\*\* Sent when a invoice's due period is about to end \* \`authorization_succeeded\` - Triggered when a authorization transaction is created. \* \`authorization_voided\` - Triggered when a authorization transaction is voided. Authorization can be voided either manually or when blocked funds are released by the gateway after a certain period of time. \* \`card_added\` - Sent when a card is added for a customer. \* \`card_updated\` - Sent when the card is updated for a customer. \* \`card_expiry_reminder\` - Sent when the customer's credit card is expiring soon. Sent 30 days before the expiry date. \* \`card_expired\` - Sent when a card for a customer is expired \* \`card_deleted\` - Sent when a card is deleted for a customer \* \`payment_source_added\` - Sent when a payment source is added for a customer. \* \`payment_source_updated\` - Sent when the payment source is updated for a customer or when role is assigned to the payment source. \* \`payment_source_deleted\` - Sent when a payment source is deleted for a customer \* \`payment_source_expiring\` - Sent when the customer's payment source is expiring soon. Sent 30 days before the expiry date. \* \`payment_source_expired\` - Sent when a payment source for a customer is expired \* \`payment_source_locally_deleted\` - Sent when a payment source for a customer removed from Chargebee \* \`virtual_bank_account_added\` - Sent when a virtual bank account is added for a customer. \* \`virtual_bank_account_updated\` - Sent when the virtual bank account is updated for a customer. \* \`virtual_bank_account_deleted\` - Sent when a virtual bank account is deleted for a customer. \* \`token_created\` - Sent when a Token is created \* \`token_consumed\` - Sent when a Token is consumed \* \`token_expired\` - Sent when a Token is expired \* \`unbilled_charges_created\` - Triggered when unbilled charges are created \* \`unbilled_charges_voided\` - Triggered when unbilled charges are voided \* \`unbilled_charges_deleted\` - Triggered when unbilled charges are deleted \* \`unbilled_charges_invoiced\` - Triggered when unbilled charges are invoiced \* \`order_created\` - Triggered when order is created \* \`order_updated\` - Triggered when order is updated \* \`order_cancelled\` - Triggered when order is cancelled \* \`order_delivered\` - Triggered when order is marked as delivered \* \`order_returned\` - Triggered when order is marked as returned \* \`order_ready_to_process\` - Triggered when order reaches it's order date \* \`order_ready_to_ship\` - Triggered when order reaches it's shipping date \* \`order_deleted\` - Triggered when order is deleted \* \`order_resent\` - Triggered when order is resent \* \`quote_created\` - Triggered when quote is created \* \`quote_updated\` - Triggered when quote is updated \* \`quote_deleted\` - Triggered when quote is deleted \* \`tax_withheld_recorded\` - Triggered when a tax withheld is recorded for an invoice \* \`tax_withheld_deleted\` - Triggered when a tax withheld is deleted \* \`tax_withheld_refunded\` - Sent when a tax withheld refund is made \* \`gift_scheduled\` - Triggered when a new gift is created \* \`gift_unclaimed\` - Triggered when a new gift is unclaimed and is ready to be claimed \* \`gift_claimed\` - Triggered when a gift is claimed \* \`gift_expired\` - Triggered when a gift expires \* \`gift_cancelled\` - Triggered when a gift is cancelled. \* \`gift_updated\` - Triggered when a gift is updated \* \`hierarchy_created\` - Triggered when a hierarchy is created \* \`hierarchy_deleted\` - Triggered when a hierarchy is deleted \* \`payment_intent_created\` - Sent when a Payment intent is created \* \`payment_intent_updated\` - Sent when a Payment intent is updated \* \`contract_term_created\` - Triggered when new contract term is created \* \`contract_term_renewed\` - Triggered when new contract term is renewed \* \`contract_term_terminated\` - Triggered when contract term is terminated \* \`contract_term_completed\` - Triggered when contract term is completed \* \`contract_term_cancelled\` - Triggered when contract term is cancelled \* \`item_family_created\` - Triggered when an item family is created \* \`item_family_updated\` - Triggered when an item family is updated \* \`item_family_deleted\` - Triggered when an item family is deleted \* \`item_created\` - Triggered when an item is created \* \`item_updated\` - Triggered when an item is updated \* \`item_deleted\` - Triggered when an item is deleted \* \`item_price_created\` - Triggered when an item price is created \* \`item_price_updated\` - Triggered when an item price is updated \* \`item_price_deleted\` - Triggered when an item price is deleted \* \`attached_item_created\` - Triggered when an Attached item is created \* \`attached_item_updated\` - Triggered when an Attached item is updated \* \`attached_item_deleted\` - Triggered when an Attached item is deleted \* \`differential_price_created\` - Triggered when a differential price is created \* \`differential_price_updated\` - Triggered when a differential price is updated \* \`differential_price_deleted\` - Triggered when a differential price is deleted \* \`feature_created\` - Triggered when a feature is created. \* \`feature_updated\` - Triggered when an feature is updated \* \`feature_deleted\` - Triggered when a feature is deleted \* \`feature_activated\` - Triggered when a feature \`status\` transitions to \`active\` for the first time. \* \`feature_reactivated\` - Triggered when a feature \`status\` transitions to \`active\` for the second time or more. \* \`feature_archived\` - Triggered when an feature is archived \* \`item_entitlements_updated\` - Triggered when item entitlements are updated to a feature \* \`entitlement_overrides_updated\` - Triggered when an override entitlement is updated \* \`entitlement_overrides_removed\` - Triggered when an override entitlement is removed \* \`item_entitlements_removed\` - Triggered when item entitlements are removed for a feature \* \`entitlement_overrides_auto_removed\` - Triggered when Subscription entitlements overrides for a feature are auto removed after expiry \* \`subscription_entitlements_created\` - Triggered when subscription entitlements are created for a new subscription \* \`business_entity_created\` - Sent when a business entity is created. \* \`business_entity_updated\` - Sent when a business entity is updated. \* \`business_entity_deleted\` - Sent when a business entity is deleted. \* \`customer_business_entity_changed\` - Sent when a customer's business entity is changed. \* \`subscription_business_entity_changed\` - Sent when a subscription's business entity is changed. \* \`purchase_created\` - Triggered when purchase action is completed successfully \* \`voucher_created\` - Triggered when a payment voucher is created \* \`voucher_expired\` - Triggered when a payment voucher is expired \* \`voucher_create_failed\` - Triggered when a payment voucher creation is failed \* \`product_created\` - \*\*(Deprecated)\*\* Triggered when the product create is completed successfully \* \`product_updated\` - \*\*(Deprecated)\*\* Triggered when the product update is completed successfully \* \`product_deleted\` - \*\*(Deprecated)\*\* Triggered when the product delete is completed successfully \* \`variant_created\` - \*\*(Deprecated)\*\* Triggered when product variant create completed successfully \* \`variant_updated\` - \*\*(Deprecated)\*\* Triggered when product variant update completed successfully \* \`variant_deleted\` - \*\*(Deprecated)\*\* Triggered when product variant delete completed successfully \* \`item_price_entitlements_updated\` - Triggered when item Price entitlements are updated to a feature \* \`item_price_entitlements_removed\` - Triggered when item price entitlements are removed for a feature \* \`ramp_created\` - Triggered when a subscription ramp is created. \* \`ramp_deleted\` - Triggered when a subscription ramp is deleted. \* \`ramp_applied\` - Triggered when a subscription ramp is applied. \* \`price_variant_created\` - Triggered when a price variant is created. \* \`price_variant_updated\` - Triggered when a price variant is updated. \* \`price_variant_deleted\` - Triggered when a price variant is deleted. + enum: + - coupon_created + - coupon_updated + - coupon_deleted + - coupon_set_created + - coupon_set_updated + - coupon_set_deleted + - coupon_codes_added + - coupon_codes_deleted + - coupon_codes_updated + - customer_created + - customer_changed + - customer_deleted + - customer_moved_out + - customer_moved_in + - promotional_credits_added + - promotional_credits_deducted + - subscription_created + - subscription_created_with_backdating + - subscription_started + - subscription_trial_end_reminder + - subscription_activated + - subscription_activated_with_backdating + - subscription_changed + - subscription_trial_extended + - mrr_updated + - subscription_changed_with_backdating + - subscription_cancellation_scheduled + - subscription_cancellation_reminder + - subscription_cancelled + - subscription_canceled_with_backdating + - subscription_reactivated + - subscription_reactivated_with_backdating + - subscription_renewed + - subscription_scheduled_cancellation_removed + - subscription_changes_scheduled + - subscription_scheduled_changes_removed + - subscription_shipping_address_updated + - subscription_deleted + - subscription_paused + - subscription_pause_scheduled + - subscription_scheduled_pause_removed + - subscription_resumed + - subscription_resumption_scheduled + - subscription_scheduled_resumption_removed + - subscription_advance_invoice_schedule_added + - subscription_advance_invoice_schedule_updated + - subscription_advance_invoice_schedule_removed + - pending_invoice_created + - pending_invoice_updated + - invoice_generated + - invoice_generated_with_backdating + - invoice_updated + - invoice_deleted + - credit_note_created + - credit_note_created_with_backdating + - credit_note_updated + - credit_note_deleted + - invoice_installments_created + - invoice_installment_updated + - installment_config_created + - installment_config_deleted + - subscription_renewal_reminder + - add_usages_reminder + - transaction_created + - transaction_updated + - transaction_deleted + - payment_succeeded + - payment_failed + - payment_refunded + - payment_initiated + - refund_initiated + - authorization_succeeded + - authorization_voided + - card_added + - card_updated + - card_expiry_reminder + - card_expired + - card_deleted + - payment_source_added + - payment_source_updated + - payment_source_deleted + - payment_source_expiring + - payment_source_expired + - payment_source_locally_deleted + - virtual_bank_account_added + - virtual_bank_account_updated + - virtual_bank_account_deleted + - token_created + - token_consumed + - token_expired + - unbilled_charges_created + - unbilled_charges_voided + - unbilled_charges_deleted + - unbilled_charges_invoiced + - order_created + - order_updated + - order_cancelled + - order_delivered + - order_returned + - order_ready_to_process + - order_ready_to_ship + - order_deleted + - order_resent + - quote_created + - quote_updated + - quote_deleted + - tax_withheld_recorded + - tax_withheld_deleted + - tax_withheld_refunded + - gift_scheduled + - gift_unclaimed + - gift_claimed + - gift_expired + - gift_cancelled + - gift_updated + - hierarchy_created + - hierarchy_deleted + - payment_intent_created + - payment_intent_updated + - contract_term_created + - contract_term_renewed + - contract_term_terminated + - contract_term_completed + - contract_term_cancelled + - item_family_created + - item_family_updated + - item_family_deleted + - item_created + - item_updated + - item_deleted + - item_price_created + - item_price_updated + - item_price_deleted + - attached_item_created + - attached_item_updated + - attached_item_deleted + - differential_price_created + - differential_price_updated + - differential_price_deleted + - feature_created + - feature_updated + - feature_deleted + - feature_activated + - feature_reactivated + - feature_archived + - item_entitlements_updated + - entitlement_overrides_updated + - entitlement_overrides_removed + - item_entitlements_removed + - entitlement_overrides_auto_removed + - subscription_entitlements_created + - business_entity_created + - business_entity_updated + - business_entity_deleted + - customer_business_entity_changed + - subscription_business_entity_changed + - purchase_created + - voucher_created + - voucher_expired + - voucher_create_failed + - item_price_entitlements_updated + - item_price_entitlements_removed + - ramp_created + - ramp_deleted + - ramp_applied + - price_variant_created + - price_variant_updated + - price_variant_deleted + in: + pattern: "^\\[(coupon_created|coupon_updated|coupon_deleted|coupon_set_created|coupon_set_updated|coupon_set_deleted|coupon_codes_added|coupon_codes_deleted|coupon_codes_updated|customer_created|customer_changed|customer_deleted|customer_moved_out|customer_moved_in|promotional_credits_added|promotional_credits_deducted|subscription_created|subscription_created_with_backdating|subscription_started|subscription_trial_end_reminder|subscription_activated|subscription_activated_with_backdating|subscription_changed|subscription_trial_extended|mrr_updated|subscription_changed_with_backdating|subscription_cancellation_scheduled|subscription_cancellation_reminder|subscription_cancelled|subscription_canceled_with_backdating|subscription_reactivated|subscription_reactivated_with_backdating|subscription_renewed|subscription_scheduled_cancellation_removed|subscription_changes_scheduled|subscription_scheduled_changes_removed|subscription_shipping_address_updated|subscription_deleted|subscription_paused|subscription_pause_scheduled|subscription_scheduled_pause_removed|subscription_resumed|subscription_resumption_scheduled|subscription_scheduled_resumption_removed|subscription_advance_invoice_schedule_added|subscription_advance_invoice_schedule_updated|subscription_advance_invoice_schedule_removed|pending_invoice_created|pending_invoice_updated|invoice_generated|invoice_generated_with_backdating|invoice_updated|invoice_deleted|credit_note_created|credit_note_created_with_backdating|credit_note_updated|credit_note_deleted|invoice_installments_created|invoice_installment_updated|installment_config_created|installment_config_deleted|subscription_renewal_reminder|add_usages_reminder|transaction_created|transaction_updated|transaction_deleted|payment_succeeded|payment_failed|payment_refunded|payment_initiated|refund_initiated|netd_payment_due_reminder|authorization_succeeded|authorization_voided|card_added|card_updated|card_expiry_reminder|card_expired|card_deleted|payment_source_added|payment_source_updated|payment_source_deleted|payment_source_expiring|payment_source_expired|payment_source_locally_deleted|virtual_bank_account_added|virtual_bank_account_updated|virtual_bank_account_deleted|token_created|token_consumed|token_expired|unbilled_charges_created|unbilled_charges_voided|unbilled_charges_deleted|unbilled_charges_invoiced|order_created|order_updated|order_cancelled|order_delivered|order_returned|order_ready_to_process|order_ready_to_ship|order_deleted|order_resent|quote_created|quote_updated|quote_deleted|tax_withheld_recorded|tax_withheld_deleted|tax_withheld_refunded|gift_scheduled|gift_unclaimed|gift_claimed|gift_expired|gift_cancelled|gift_updated|hierarchy_created|hierarchy_deleted|payment_intent_created|payment_intent_updated|contract_term_created|contract_term_renewed|contract_term_terminated|contract_term_completed|contract_term_cancelled|item_family_created|item_family_updated|item_family_deleted|item_created|item_updated|item_deleted|item_price_created|item_price_updated|item_price_deleted|attached_item_created|attached_item_updated|attached_item_deleted|differential_price_created|differential_price_updated|differential_price_deleted|feature_created|feature_updated|feature_deleted|feature_activated|feature_reactivated|feature_archived|item_entitlements_updated|entitlement_overrides_updated|entitlement_overrides_removed|item_entitlements_removed|entitlement_overrides_auto_removed|subscription_entitlements_created|business_entity_created|business_entity_updated|business_entity_deleted|customer_business_entity_changed|subscription_business_entity_changed|purchase_created|voucher_created|voucher_expired|voucher_create_failed|product_created|product_updated|product_deleted|variant_created|variant_updated|variant_deleted|item_price_entitlements_updated|item_price_entitlements_removed|ramp_created|ramp_deleted|ramp_applied|price_variant_created|price_variant_updated|price_variant_deleted)(,(coupon_created|coupon_updated|coupon_deleted|coupon_set_created|coupon_set_updated|coupon_set_deleted|coupon_codes_added|coupon_codes_deleted|coupon_codes_updated|customer_created|customer_changed|customer_deleted|customer_moved_out|customer_moved_in|promotional_credits_added|promotional_credits_deducted|subscription_created|subscription_created_with_backdating|subscription_started|subscription_trial_end_reminder|subscription_activated|subscription_activated_with_backdating|subscription_changed|subscription_trial_extended|mrr_updated|subscription_changed_with_backdating|subscription_cancellation_scheduled|subscription_cancellation_reminder|subscription_cancelled|subscription_canceled_with_backdating|subscription_reactivated|subscription_reactivated_with_backdating|subscription_renewed|subscription_scheduled_cancellation_removed|subscription_changes_scheduled|subscription_scheduled_changes_removed|subscription_shipping_address_updated|subscription_deleted|subscription_paused|subscription_pause_scheduled|subscription_scheduled_pause_removed|subscription_resumed|subscription_resumption_scheduled|subscription_scheduled_resumption_removed|subscription_advance_invoice_schedule_added|subscription_advance_invoice_schedule_updated|subscription_advance_invoice_schedule_removed|pending_invoice_created|pending_invoice_updated|invoice_generated|invoice_generated_with_backdating|invoice_updated|invoice_deleted|credit_note_created|credit_note_created_with_backdating|credit_note_updated|credit_note_deleted|invoice_installments_created|invoice_installment_updated|installment_config_created|installment_config_deleted|subscription_renewal_reminder|add_usages_reminder|transaction_created|transaction_updated|transaction_deleted|payment_succeeded|payment_failed|payment_refunded|payment_initiated|refund_initiated|netd_payment_due_reminder|authorization_succeeded|authorization_voided|card_added|card_updated|card_expiry_reminder|card_expired|card_deleted|payment_source_added|payment_source_updated|payment_source_deleted|payment_source_expiring|payment_source_expired|payment_source_locally_deleted|virtual_bank_account_added|virtual_bank_account_updated|virtual_bank_account_deleted|token_created|token_consumed|token_expired|unbilled_charges_created|unbilled_charges_voided|unbilled_charges_deleted|unbilled_charges_invoiced|order_created|order_updated|order_cancelled|order_delivered|order_returned|order_ready_to_process|order_ready_to_ship|order_deleted|order_resent|quote_created|quote_updated|quote_deleted|tax_withheld_recorded|tax_withheld_deleted|tax_withheld_refunded|gift_scheduled|gift_unclaimed|gift_claimed|gift_expired|gift_cancelled|gift_updated|hierarchy_created|hierarchy_deleted|payment_intent_created|payment_intent_updated|contract_term_created|contract_term_renewed|contract_term_terminated|contract_term_completed|contract_term_cancelled|item_family_created|item_family_updated|item_family_deleted|item_created|item_updated|item_deleted|item_price_created|item_price_updated|item_price_deleted|attached_item_created|attached_item_updated|attached_item_deleted|differential_price_created|differential_price_updated|differential_price_deleted|feature_created|feature_updated|feature_deleted|feature_activated|feature_reactivated|feature_archived|item_entitlements_updated|entitlement_overrides_updated|entitlement_overrides_removed|item_entitlements_removed|entitlement_overrides_auto_removed|subscription_entitlements_created|business_entity_created|business_entity_updated|business_entity_deleted|customer_business_entity_changed|subscription_business_entity_changed|purchase_created|voucher_created|voucher_expired|voucher_create_failed|product_created|product_updated|product_deleted|variant_created|variant_updated|variant_deleted|item_price_entitlements_updated|item_price_entitlements_removed|ramp_created|ramp_deleted|ramp_applied|price_variant_created|price_variant_updated|price_variant_deleted))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(coupon_created|coupon_updated|coupon_deleted|coupon_set_created|coupon_set_updated|coupon_set_deleted|coupon_codes_added|coupon_codes_deleted|coupon_codes_updated|customer_created|customer_changed|customer_deleted|customer_moved_out|customer_moved_in|promotional_credits_added|promotional_credits_deducted|subscription_created|subscription_created_with_backdating|subscription_started|subscription_trial_end_reminder|subscription_activated|subscription_activated_with_backdating|subscription_changed|subscription_trial_extended|mrr_updated|subscription_changed_with_backdating|subscription_cancellation_scheduled|subscription_cancellation_reminder|subscription_cancelled|subscription_canceled_with_backdating|subscription_reactivated|subscription_reactivated_with_backdating|subscription_renewed|subscription_scheduled_cancellation_removed|subscription_changes_scheduled|subscription_scheduled_changes_removed|subscription_shipping_address_updated|subscription_deleted|subscription_paused|subscription_pause_scheduled|subscription_scheduled_pause_removed|subscription_resumed|subscription_resumption_scheduled|subscription_scheduled_resumption_removed|subscription_advance_invoice_schedule_added|subscription_advance_invoice_schedule_updated|subscription_advance_invoice_schedule_removed|pending_invoice_created|pending_invoice_updated|invoice_generated|invoice_generated_with_backdating|invoice_updated|invoice_deleted|credit_note_created|credit_note_created_with_backdating|credit_note_updated|credit_note_deleted|invoice_installments_created|invoice_installment_updated|installment_config_created|installment_config_deleted|subscription_renewal_reminder|add_usages_reminder|transaction_created|transaction_updated|transaction_deleted|payment_succeeded|payment_failed|payment_refunded|payment_initiated|refund_initiated|netd_payment_due_reminder|authorization_succeeded|authorization_voided|card_added|card_updated|card_expiry_reminder|card_expired|card_deleted|payment_source_added|payment_source_updated|payment_source_deleted|payment_source_expiring|payment_source_expired|payment_source_locally_deleted|virtual_bank_account_added|virtual_bank_account_updated|virtual_bank_account_deleted|token_created|token_consumed|token_expired|unbilled_charges_created|unbilled_charges_voided|unbilled_charges_deleted|unbilled_charges_invoiced|order_created|order_updated|order_cancelled|order_delivered|order_returned|order_ready_to_process|order_ready_to_ship|order_deleted|order_resent|quote_created|quote_updated|quote_deleted|tax_withheld_recorded|tax_withheld_deleted|tax_withheld_refunded|gift_scheduled|gift_unclaimed|gift_claimed|gift_expired|gift_cancelled|gift_updated|hierarchy_created|hierarchy_deleted|payment_intent_created|payment_intent_updated|contract_term_created|contract_term_renewed|contract_term_terminated|contract_term_completed|contract_term_cancelled|item_family_created|item_family_updated|item_family_deleted|item_created|item_updated|item_deleted|item_price_created|item_price_updated|item_price_deleted|attached_item_created|attached_item_updated|attached_item_deleted|differential_price_created|differential_price_updated|differential_price_deleted|feature_created|feature_updated|feature_deleted|feature_activated|feature_reactivated|feature_archived|item_entitlements_updated|entitlement_overrides_updated|entitlement_overrides_removed|item_entitlements_removed|entitlement_overrides_auto_removed|subscription_entitlements_created|business_entity_created|business_entity_updated|business_entity_deleted|customer_business_entity_changed|subscription_business_entity_changed|purchase_created|voucher_created|voucher_expired|voucher_create_failed|product_created|product_updated|product_deleted|variant_created|variant_updated|variant_deleted|item_price_entitlements_updated|item_price_entitlements_removed|ramp_created|ramp_deleted|ramp_applied|price_variant_created|price_variant_updated|price_variant_deleted)(,(coupon_created|coupon_updated|coupon_deleted|coupon_set_created|coupon_set_updated|coupon_set_deleted|coupon_codes_added|coupon_codes_deleted|coupon_codes_updated|customer_created|customer_changed|customer_deleted|customer_moved_out|customer_moved_in|promotional_credits_added|promotional_credits_deducted|subscription_created|subscription_created_with_backdating|subscription_started|subscription_trial_end_reminder|subscription_activated|subscription_activated_with_backdating|subscription_changed|subscription_trial_extended|mrr_updated|subscription_changed_with_backdating|subscription_cancellation_scheduled|subscription_cancellation_reminder|subscription_cancelled|subscription_canceled_with_backdating|subscription_reactivated|subscription_reactivated_with_backdating|subscription_renewed|subscription_scheduled_cancellation_removed|subscription_changes_scheduled|subscription_scheduled_changes_removed|subscription_shipping_address_updated|subscription_deleted|subscription_paused|subscription_pause_scheduled|subscription_scheduled_pause_removed|subscription_resumed|subscription_resumption_scheduled|subscription_scheduled_resumption_removed|subscription_advance_invoice_schedule_added|subscription_advance_invoice_schedule_updated|subscription_advance_invoice_schedule_removed|pending_invoice_created|pending_invoice_updated|invoice_generated|invoice_generated_with_backdating|invoice_updated|invoice_deleted|credit_note_created|credit_note_created_with_backdating|credit_note_updated|credit_note_deleted|invoice_installments_created|invoice_installment_updated|installment_config_created|installment_config_deleted|subscription_renewal_reminder|add_usages_reminder|transaction_created|transaction_updated|transaction_deleted|payment_succeeded|payment_failed|payment_refunded|payment_initiated|refund_initiated|netd_payment_due_reminder|authorization_succeeded|authorization_voided|card_added|card_updated|card_expiry_reminder|card_expired|card_deleted|payment_source_added|payment_source_updated|payment_source_deleted|payment_source_expiring|payment_source_expired|payment_source_locally_deleted|virtual_bank_account_added|virtual_bank_account_updated|virtual_bank_account_deleted|token_created|token_consumed|token_expired|unbilled_charges_created|unbilled_charges_voided|unbilled_charges_deleted|unbilled_charges_invoiced|order_created|order_updated|order_cancelled|order_delivered|order_returned|order_ready_to_process|order_ready_to_ship|order_deleted|order_resent|quote_created|quote_updated|quote_deleted|tax_withheld_recorded|tax_withheld_deleted|tax_withheld_refunded|gift_scheduled|gift_unclaimed|gift_claimed|gift_expired|gift_cancelled|gift_updated|hierarchy_created|hierarchy_deleted|payment_intent_created|payment_intent_updated|contract_term_created|contract_term_renewed|contract_term_terminated|contract_term_completed|contract_term_cancelled|item_family_created|item_family_updated|item_family_deleted|item_created|item_updated|item_deleted|item_price_created|item_price_updated|item_price_deleted|attached_item_created|attached_item_updated|attached_item_deleted|differential_price_created|differential_price_updated|differential_price_deleted|feature_created|feature_updated|feature_deleted|feature_activated|feature_reactivated|feature_archived|item_entitlements_updated|entitlement_overrides_updated|entitlement_overrides_removed|item_entitlements_removed|entitlement_overrides_auto_removed|subscription_entitlements_created|business_entity_created|business_entity_updated|business_entity_deleted|customer_business_entity_changed|subscription_business_entity_changed|purchase_created|voucher_created|voucher_expired|voucher_create_failed|product_created|product_updated|product_deleted|variant_created|variant_updated|variant_deleted|item_price_entitlements_updated|item_price_entitlements_removed|ramp_created|ramp_deleted|ramp_applied|price_variant_created|price_variant_updated|price_variant_deleted))*\\\ + ]$" + type: string + example: customer_created + deprecated: false + - name: source + in: query + description: "optional, enumerated string filter
Source\ + \ of the event. Possible values are : admin_console, api, scheduled_job,\ + \ hosted_page, portal, system, none, js_api, migration, bulk_operation,\ + \ external_service.
Supported operators : is, is_not, in,\ + \ not_in

Example source[is_not]\ + \ = \"hosted_page\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`admin_console\` - Operation made through the Chargebee admin UI \* \`api\` - Operation made through the API \* \`scheduled_job\` - Operation made through the Scheduled Jobs \* \`hosted_page\` - Operation made through the Hosted Pages \* \`portal\` - Operation made through [Self-Serve Portal](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html) \* \`system\` - Operation that are triggered by ChargeBee System \* \`none\` - If no source can be identified for an operation \* \`js_api\` - Operation made through the JS API \* \`migration\` - Deprecated \* \`bulk_operation\` - Operation that are triggerd through bulk operation. \* \`external_service\` - Operation that are triggered via webhook + enum: + - admin_console + - api + - scheduled_job + - hosted_page + - portal + - system + - none + - js_api + - migration + - bulk_operation + - external_service + is_not: + type: string + description: | + \* \`admin_console\` - Operation made through the Chargebee admin UI \* \`api\` - Operation made through the API \* \`scheduled_job\` - Operation made through the Scheduled Jobs \* \`hosted_page\` - Operation made through the Hosted Pages \* \`portal\` - Operation made through [Self-Serve Portal](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html) \* \`system\` - Operation that are triggered by ChargeBee System \* \`none\` - If no source can be identified for an operation \* \`js_api\` - Operation made through the JS API \* \`migration\` - Deprecated \* \`bulk_operation\` - Operation that are triggerd through bulk operation. \* \`external_service\` - Operation that are triggered via webhook + enum: + - admin_console + - api + - scheduled_job + - hosted_page + - portal + - system + - none + - js_api + - migration + - bulk_operation + - external_service + in: + pattern: "^\\[(admin_console|api|scheduled_job|hosted_page|portal|system|none|js_api|migration|bulk_operation|external_service)(,(admin_console|api|scheduled_job|hosted_page|portal|system|none|js_api|migration|bulk_operation|external_service))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(admin_console|api|scheduled_job|hosted_page|portal|system|none|js_api|migration|bulk_operation|external_service)(,(admin_console|api|scheduled_job|hosted_page|portal|system|none|js_api|migration|bulk_operation|external_service))*\\\ + ]$" + type: string + example: hosted_page + deprecated: false + - name: occurred_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
Timestamp indicating when this event had occurred.
Supported\ + \ operators : after, before, on, between

Example occurred_at[after] = \"1349116200\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1349116200" + deprecated: false + - name: sort_by + in: query + description: "optional, string filter
Sorts\ + \ based on the specified attribute.
Supported attributes : occurred_at
Supported\ + \ sort-orders : asc, desc

Example sort_by[asc] = \"occurred_at\"
This\ + \ will sort the result based on the 'occurred_at' attribute in ascending(earliest\ + \ first) order." + required: false + style: deepObject + explode: true + schema: + minProperties: 1 + type: object + properties: + asc: + type: string + enum: + - occurred_at + desc: + type: string + enum: + - occurred_at + additionalProperties: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - event + type: object + properties: + event: + $ref: '#/components/schemas/Event' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /events/{event-id}: + get: + summary: Retrieve an event + description: | + Retrieves a specific event identified by a unique event identifier. + + **Note:** Only events that are less than 90 days old will be retrieved. + operationId: retrieve_an_event + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(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-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: event-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - event + type: object + properties: + event: + $ref: '#/components/schemas/Event' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /comments/{comment-id}/delete: + post: + summary: Delete a comment + description: | + Delete a comment for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver=1#create_a_comment_entity_type) identified by comment ID. + + Only the comments that are added via Admin console and API can be deleted. Chargebee generated "System" comments cannot be deleted. + operationId: delete_a_comment + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|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1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: comment-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - comment + type: object + properties: + comment: + $ref: '#/components/schemas/Comment' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /comments/{comment-id}: + get: + summary: Retrieve a comment + description: | + Retrieve a comment for an entity identified by comment ID. + operationId: retrieve_a_comment + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9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?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: comment-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - comment + type: object + properties: + comment: + $ref: '#/components/schemas/Comment' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /comments: + get: + summary: List comments + description: | + Retrieve the list of comments sorted by the recent ones on the top. + + If you want to retrieve the list of comments for an [entity](https://apidocs.chargebee.com/docs/api/v1/comments?prod_cat_ver=1#list_comments_entity_type), for example, subscription you can filter them by passing the entity type and unique identifier for that entity, for example, subscription ID. + operationId: list_comments + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-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1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: entity_type + in: query + description: |- + Type of the entity this comment generated for. + * item - Entity that represents item + * order - Entity that represents an order + * item_price - Entity that represents item price + * customer - Entity that represents a customer + * variant - Entity that represents product variants + * invoice - Invoice description + * product - Entity that represents product + * business_entity - Entity that represents item of type business entity + * plan - Entity that represents a subscription plan + * coupon - Entity that represents a discount coupon + * subscription - Entity that represents a subscription of a customer + * item_family - Entity that represents item family + * transaction - Entity that represents a transaction. + * addon - Entity that represents an addon + * credit_note - Credit note description + * quote - Entity that represents a quote + required: false + deprecated: false + style: form + explode: true + schema: + type: string + deprecated: false + enum: + - customer + - subscription + - invoice + - quote + - credit_note + - transaction + - plan + - addon + - coupon + - order + - business_entity + - item_family + - item + - item_price + - price_variant + - name: entity_id + in: query + description: Unique identifier of the entity. + required: false + deprecated: false + style: form + explode: true + schema: + maxLength: 100 + type: string + deprecated: false + - name: created_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
The time at which this comment was created.
Supported\ + \ operators : after, before, on, between

Example created_at[on] = \"1456332678\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1456332678" + deprecated: false + - name: sort_by + in: query + description: "optional, string filter
Sorts\ + \ based on the specified attribute.
Supported attributes : created_at
Supported\ + \ sort-orders : asc, desc

Example sort_by[asc] = \"created_at\"
This\ + \ will sort the result based on the 'created_at' attribute in ascending(earliest\ + \ first) order." + required: false + style: deepObject + explode: true + schema: + minProperties: 1 + type: object + properties: + asc: + type: string + enum: + - created_at + desc: + type: string + enum: + - created_at + additionalProperties: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - comment + type: object + properties: + comment: + $ref: '#/components/schemas/Comment' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + post: + summary: Create a comment + description: | + Create a new comment for an entity. The newly added comment will be shown in the web interface as well. + operationId: create_a_comment + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]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9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - entity_id + - entity_type + - notes + type: object + properties: + entity_type: + type: string + description: | + Type of the entity to create the comment for. \* item - Entity that represents item \* order - Entity that represents an order \* item_price - Entity that represents item price \* customer - Entity that represents a customer \* variant - Entity that represents product variants \* invoice - Invoice description \* product - Entity that represents product \* business_entity - Entity that represents item of type business entity \* plan - Entity that represents a subscription plan \* coupon - Entity that represents a discount coupon \* subscription - Entity that represents a subscription of a customer \* item_family - Entity that represents item family \* transaction - Entity that represents a transaction. \* addon - Entity that represents an addon \* credit_note - Credit note description \* quote - Entity that represents a quote + deprecated: false + enum: + - customer + - subscription + - invoice + - quote + - credit_note + - transaction + - plan + - addon + - coupon + - order + - business_entity + - item_family + - item + - item_price + - price_variant + entity_id: + maxLength: 100 + type: string + description: | + Unique identifier of the entity. + deprecated: false + notes: + maxLength: 1000 + type: string + description: | + Actual notes for the comment. + deprecated: false + added_by: + maxLength: 100 + type: string + description: | + The user who created the comment. If created via API, this contains the name given for the API key used. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - comment + type: object + properties: + comment: + $ref: '#/components/schemas/Comment' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /portal_sessions: + post: + summary: Create a portal session + description: | + Creates a portal session for a customer. The session resource in the response contains the access URL. Forward the customer to that access URL. If you would like to logout the customer later via API call, you need to store the id of the portal session resource returned by this API. While creating a session, you also need to pass the redirect URL to which your customers will be sent to upon logout from the portal UI. + operationId: create_a_portal_session + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[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:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + redirect_url: + maxLength: 250 + type: string + description: | + URL to redirect when the user logs out from the portal. + deprecated: false + forward_url: + maxLength: 250 + type: string + description: "By default access_url redirects the customer to the\ + \ portal home page. If you would like to redirect the customer\ + \ to a different URL, you can use this parameter to do so. \n\ + \n**Note:** This parameter is not applicable for [in-app](https://www.chargebee.com/docs/v3-self-serve-portal.html)\ + \ portal.\n" + deprecated: false + customer: + required: + - id + type: object + properties: + id: + maxLength: 50 + type: string + description: | + Identifier of the customer. + deprecated: false + description: | + Parameters for customer + deprecated: false + encoding: + customer: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - portal_session + type: object + properties: + portal_session: + $ref: '#/components/schemas/PortalSession' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /portal_sessions/{portal-session-id}/activate: + post: + summary: Activate a portal session + description: | + When an user is sent back to your return URL with session details, you should validate that information by calling this API. The details passed to the **return_url** should be sent as below: + + * **auth_session_id** - this should be sent as part of the endpoint. + * **auth_session_token** - this should be sent as value for the input parameter **token**. + + + + **Note:** This API is not applicable for [in-app](https://www.chargebee.com/docs/v3-self-serve-portal.html) portal. + operationId: activate_a_portal_session + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]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[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: portal-session-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - token + type: object + properties: + token: + maxLength: 70 + type: string + description: | + Unique pre-authenticated portal session token to access customer portal directly. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - portal_session + type: object + properties: + portal_session: + $ref: '#/components/schemas/PortalSession' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /portal_sessions/{portal-session-id}/logout: + post: + summary: Logout a portal session + description: | + Logs out the portal session. Typically this should be called when customers logout of your application. + + If this API is called for a Portal Session that currently is in : + + * "created" status, the session status will be marked as "logged_out" and the access URL will become invalid. + * "logged_in" status, the session status will be marked as "logged_out" and customer will not be able to use that session. + * "logged_out" status, this will return normally without changing any attribute of this resource. + operationId: logout_a_portal_session + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: portal-session-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - portal_session + type: object + properties: + portal_session: + $ref: '#/components/schemas/PortalSession' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /portal_sessions/{portal-session-id}: + get: + summary: Retrieve a portal session + description: | + This API retrieves a portal session using `portal_session_id` as a path parameter. + operationId: retrieve_a_portal_session + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(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0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: portal-session-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - portal_session + type: object + properties: + portal_session: + $ref: '#/components/schemas/PortalSession' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /site_migration_details: + get: + summary: List site migration details + description: | + This endpoint lists the site migration details. + operationId: list_site_migration_details + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA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|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: entity_id_at_other_site + in: query + description: "optional, string filter
Entity\ + \ Id of the record in the other site.
Supported operators : is,\ + \ is_not, starts_with

Example →\ + entity_id_at_other_site[is] = \"null\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + deprecated: false + example: null + - name: other_site_name + in: query + description: "optional, string filter
Site\ + \ name to which the record is moved in/out.
Supported operators :\ + \ is, is_not, starts_with

Example other_site_name[is] = \"acme-test\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + example: acme-test + deprecated: false + - name: entity_id + in: query + description: "optional, string filter
Id\ + \ of the entity in this site.
Supported operators : is, is_not,\ + \ starts_with

Example entity_id[is]\ + \ = \"8axqwer7as\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + example: 8axqwer7as + deprecated: false + - name: entity_type + in: query + description: "optional, enumerated string filter
Entity\ + \ Type of the record. Possible values are : customer, subscription,\ + \ invoice, credit_note, transaction, order.
Supported operators\ + \ : is, is_not, in, not_in

Example entity_type[is] = \"customer\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`customer\` - Entity that represents a customer \* \`subscription\` - Entity that represents a subscription of a customer \* \`invoice\` - Invoice description \* \`credit_note\` - Credit note description \* \`transaction\` - Entity that represents a transaction. \* \`order\` - Entity that represents an order + enum: + - customer + - subscription + - invoice + - credit_note + - transaction + - order + is_not: + type: string + description: | + \* \`customer\` - Entity that represents a customer \* \`subscription\` - Entity that represents a subscription of a customer \* \`invoice\` - Invoice description \* \`credit_note\` - Credit note description \* \`transaction\` - Entity that represents a transaction. \* \`order\` - Entity that represents an order + enum: + - customer + - subscription + - invoice + - credit_note + - transaction + - order + in: + pattern: "^\\[(customer|subscription|invoice|credit_note|transaction|order)(,(customer|subscription|invoice|credit_note|transaction|order))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(customer|subscription|invoice|credit_note|transaction|order)(,(customer|subscription|invoice|credit_note|transaction|order))*\\\ + ]$" + type: string + example: customer + deprecated: false + - name: status + in: query + description: "optional, enumerated string filter
Status\ + \ of the migration. Possible values are : moved_in, moved_out, moving_out.
Supported\ + \ operators : is, is_not, in, not_in

Example status[is] = \"MOVED_OUT\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`moved_in\` - Moved in from another cb site \* \`moved_out\` - Moved out from one cb site to another \* \`moving_out\` - Moving out from one cb site to another + enum: + - moved_in + - moved_out + - moving_out + is_not: + type: string + description: | + \* \`moved_in\` - Moved in from another cb site \* \`moved_out\` - Moved out from one cb site to another \* \`moving_out\` - Moving out from one cb site to another + enum: + - moved_in + - moved_out + - moving_out + in: + pattern: "^\\[(moved_in|moved_out|moving_out)(,(moved_in|moved_out|moving_out))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(moved_in|moved_out|moving_out)(,(moved_in|moved_out|moving_out))*\\\ + ]$" + type: string + example: MOVED_OUT + deprecated: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - site_migration_detail + type: object + properties: + site_migration_detail: + $ref: '#/components/schemas/SiteMigrationDetail' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /resource_migrations/retrieve_latest: + get: + summary: Retrieve latest migration details + description: | + Gets the last migration details. + operationId: retrieve_latest_migration_details + parameters: + - name: from_site + in: query + description: Domain name to which the item is moved. + required: true + deprecated: false + style: form + explode: true + schema: + maxLength: 50 + minLength: 4 + type: string + deprecated: false + - name: entity_type + in: query + description: |- + Type of the entity this record is stored for. + * customer - Entity that represents a customer + required: true + deprecated: false + style: form + explode: true + schema: + type: string + deprecated: false + enum: + - customer + - name: entity_id + in: query + description: Handle of the customer in the current site. + required: true + deprecated: false + style: form + explode: true + schema: + maxLength: 100 + type: string + deprecated: false + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){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9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - resource_migration + type: object + properties: + resource_migration: + $ref: '#/components/schemas/ResourceMigration' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /time_machines/{time-machine-name}: + get: + summary: Retrieve a time machine + description: | + Retrieves the time machine. Currently only one time machine is available per site and is named 'delorean'. + operationId: retrieve_a_time_machine + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-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))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: time-machine-name + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - time_machine + type: object + properties: + time_machine: + $ref: '#/components/schemas/TimeMachine' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /time_machines/{time-machine-name}/travel_forward: + post: + summary: Travel forward + description: | + Travel forward in time. This operation is **asynchronous** . You need to check if the "start afresh" operation has completed by checking if the time travel status is **successful** by retrieving the time machine in a loop with a minimum delay of 3 secs between two retrieve requests. Use method **waitForTimeTravelCompletion()** on the returned time_machine resource which will block until the time travel completes. + operationId: travel_forward + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?: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[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: time-machine-name + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + destination_time: + pattern: "^[0-9]{10}$" + type: integer + description: | + The **time** to travel to. Should be between the 'current' destination time of the time machine and present time. + format: unix-time + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - time_machine + type: object + properties: + time_machine: + $ref: '#/components/schemas/TimeMachine' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /time_machines/{time-machine-name}/start_afresh: + post: + summary: Start Afresh + description: | + Restart the time machine. This will clear the "customer" data like customer details, subscriptions, invoices, transactions. Also a time travel is initiated to travel back to specified genesis time. + + **Note:** This API call is asynchronous. You need to check if the "start afresh" operation has completed by checking if the time travel status is **successful** by retrieving the time machine in a loop with a minimum delay of 3 secs between two retrieve requests. In case you are using any of the client libraries, use the **wait for time travel completion** function provided as a instance method in the library. Use method **waitForTimeTravelCompletion()** on the returned **time_machine** resource which will block until the time travel completes. Use method **waitForTimeTravelCompletion()** on the returned **time_machine** resource which will block until the time travel completes. Use method **wait_for_time_travel_completion** on the returned **time_machine** resource which will block until the time travel completes. Use method **wait_for_time_travel_completion** on the returned **time_machine** resource which will block until the time travel completes. Use method **WaitForTimeTravelCompletion** on the returned **time_machine** resource which will block until the time travel completes. Use method **wait_for_time_travel_completion** on the returned **time_machine** resource which will block until the time travel completes. Use method **waitForTimeTravelCompletion** on the returned **time_machine** resource which will block until the time travel completes. Use method **wait_for_time_travel_completion** on the returned **time_machine** resource which will block until the time travel completes. + operationId: start_afresh + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: time-machine-name + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + genesis_time: + pattern: "^[0-9]{10}$" + type: integer + description: "The genesis time to travel back as part of the reset\ + \ operation. If not provided, then the travel is set to 6 months\ + \ in the past. \n**Note:** Can only be in the past.\n" + format: unix-time + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - time_machine + type: object + properties: + time_machine: + $ref: '#/components/schemas/TimeMachine' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /exports/customers: + post: + summary: Export Customers + description: | + This API triggers export of customer data. The exported zip file contains CSV files with customer-related data. + operationId: export_customers + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})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?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + export_type: + type: string + description: | + Determines the format of the data. Returns the export type based on the selected value. \* data - Download your current data in CSV. \* import_friendly_data - Download import friendly data in CSV. This CSV can be used to perform [bulk operations](https://www.chargebee.com/docs/bulk-operations.html). + deprecated: false + default: data + enum: + - data + - import_friendly_data + business_entity_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + description: | + optional, string filter The unique ID of the \[business entity\](/docs/api?prod_cat_ver=2#mbe) of this subscription. This is always the same as the \[business entity\](/docs/api/subscriptions?prod_cat_ver=2#subscription_customer_id) of the customer. \*\*Supported operators :\*\* is, is_not, starts_with \*\*Example →\*\* \*business_entity_id\\\[is\\\] = "business_entity_id"\* + example: business_entity_id + deprecated: false + customer: + type: object + properties: + id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + Identifier of the customer. + example: 9bsvnHgsvmsI + deprecated: false + first_name: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + First name of the customer + example: John + deprecated: false + last_name: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Last name of the customer + example: Clint + deprecated: false + email: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Email of the customer. Configured email notifications will be sent to this email. + example: john@test.com + deprecated: false + company: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Company name of the customer. + example: Globex Corp + deprecated: false + phone: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Phone number of the customer + example: (541) 754-3010 + deprecated: false + auto_collection: + type: object + properties: + is: + type: string + description: | + \* \`on\` - Whenever an invoice is created, an automatic attempt to charge the customer's payment method is made. \* \`off\` - Automatic collection of charges will not be made. All payments must be recorded offline. + enum: + - "on" + - "off" + is_not: + type: string + description: | + \* \`on\` - Whenever an invoice is created, an automatic attempt to charge the customer's payment method is made. \* \`off\` - Automatic collection of charges will not be made. All payments must be recorded offline. + enum: + - "on" + - "off" + in: + pattern: "^\\[(on|off)(,(on|off))*\\]$" + type: string + not_in: + pattern: "^\\[(on|off)(,(on|off))*\\]$" + type: string + description: | + Whether payments needs to be collected automatically for this customer + example: "on" + deprecated: false + taxability: + type: object + properties: + is: + type: string + description: | + \* \`taxable\` - Computes tax for the customer based on the [site configuration](https://www.chargebee.com/docs/tax.html). In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero. \* \`exempt\` - + + * Customer is exempted from tax. When using Chargebee's native [Taxes](https://www.chargebee.com/docs/tax.html) feature or when using the [TaxJar integration](https://www.chargebee.com/docs/taxjar.html), no other action is needed. + * However, when using our [Avalara integration](https://www.chargebee.com/docs/avalara.html), optionally, specify `entity_code` or `exempt_number` attributes if you use Chargebee's [AvaTax for Sales](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) or specify `exemption_details` attribute if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. Tax may still be applied by Avalara for certain values of `entity_code`/`exempt_number`/`exemption_details` based on the state/region/province of the taxable address. + enum: + - taxable + - exempt + is_not: + type: string + description: | + \* \`taxable\` - Computes tax for the customer based on the [site configuration](https://www.chargebee.com/docs/tax.html). In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero. \* \`exempt\` - + + * Customer is exempted from tax. When using Chargebee's native [Taxes](https://www.chargebee.com/docs/tax.html) feature or when using the [TaxJar integration](https://www.chargebee.com/docs/taxjar.html), no other action is needed. + * However, when using our [Avalara integration](https://www.chargebee.com/docs/avalara.html), optionally, specify `entity_code` or `exempt_number` attributes if you use Chargebee's [AvaTax for Sales](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) or specify `exemption_details` attribute if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. Tax may still be applied by Avalara for certain values of `entity_code`/`exempt_number`/`exemption_details` based on the state/region/province of the taxable address. + enum: + - taxable + - exempt + in: + pattern: "^\\[(taxable|exempt)(,(taxable|exempt))*\\]$" + type: string + not_in: + pattern: "^\\[(taxable|exempt)(,(taxable|exempt))*\\]$" + type: string + description: | + Specifies if the customer is liable for tax + example: taxable + deprecated: false + created_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + Timestamp indicating when this customer resource is created. + example: "1435054328" + deprecated: false + updated_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + To filter based on \`updated_at\`. This attribute will be present only if the resource has been updated after 2016-09-28. It is advisable when using this filter, to pass the \`sort_by\` input parameter as \`updated_at\` for a faster response. + example: "1243545465" + deprecated: false + offline_payment_method: + type: object + properties: + is: + type: string + description: | + \* \`no_preference\` - No Preference \* \`cash\` - Cash \* \`check\` - Check \* \`bank_transfer\` - Bank Transfer \* \`ach_credit\` - ACH Credit \* \`sepa_credit\` - SEPA Credit \* \`boleto\` - Boleto \* \`us_automated_bank_transfer\` - US Automated Bank Transfer \* \`eu_automated_bank_transfer\` - EU Automated Bank Transfer \* \`uk_automated_bank_transfer\` - UK Automated Bank Transfer \* \`jp_automated_bank_transfer\` - JP Automated Bank Transfer \* \`mx_automated_bank_transfer\` - MX Automated Bank Transfer \* \`custom\` - Custom + enum: + - no_preference + - cash + - check + - bank_transfer + - ach_credit + - sepa_credit + - boleto + - us_automated_bank_transfer + - eu_automated_bank_transfer + - uk_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + - custom + is_not: + type: string + description: | + \* \`no_preference\` - No Preference \* \`cash\` - Cash \* \`check\` - Check \* \`bank_transfer\` - Bank Transfer \* \`ach_credit\` - ACH Credit \* \`sepa_credit\` - SEPA Credit \* \`boleto\` - Boleto \* \`us_automated_bank_transfer\` - US Automated Bank Transfer \* \`eu_automated_bank_transfer\` - EU Automated Bank Transfer \* \`uk_automated_bank_transfer\` - UK Automated Bank Transfer \* \`jp_automated_bank_transfer\` - JP Automated Bank Transfer \* \`mx_automated_bank_transfer\` - MX Automated Bank Transfer \* \`custom\` - Custom + enum: + - no_preference + - cash + - check + - bank_transfer + - ach_credit + - sepa_credit + - boleto + - us_automated_bank_transfer + - eu_automated_bank_transfer + - uk_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + - custom + in: + pattern: "^\\[(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom)(,(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom)(,(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom))*\\\ + ]$" + type: string + description: | + The preferred offline payment method for the customer. + example: cash + deprecated: false + auto_close_invoices: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Override for this customer, the \[site-level setting\](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing) for auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute is also available at the \[subscription level\](/docs/api/subscriptions?prod_cat_ver=2#subscription_auto_close_invoices) which takes precedence. + example: "true" + deprecated: false + channel: + type: object + properties: + is: + type: string + description: "\\* \\`web\\` - The object was created (and\ + \ is maintained) for the web channel directly in Chargebee\ + \ via API or UI. \\* \\`app_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this\ + \ object via UI or API is disallowed. \\* \\`play_store\\\ + ` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of\ + \ this object via UI or API is disallowed. \n\nIn-App\ + \ Subscriptions is currently in early access. Contact\ + \ [eap@chargebee.com](mailto:eap@chargebee.com) for more\ + \ information.\n" + enum: + - web + - app_store + - play_store + is_not: + type: string + description: "\\* \\`web\\` - The object was created (and\ + \ is maintained) for the web channel directly in Chargebee\ + \ via API or UI. \\* \\`app_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this\ + \ object via UI or API is disallowed. \\* \\`play_store\\\ + ` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of\ + \ this object via UI or API is disallowed. \n\nIn-App\ + \ Subscriptions is currently in early access. Contact\ + \ [eap@chargebee.com](mailto:eap@chargebee.com) for more\ + \ information.\n" + enum: + - web + - app_store + - play_store + in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + description: | + The subscription channel this object originated from and is maintained in. + example: APP STORE + deprecated: false + description: | + Parameters for customer + deprecated: false + relationship: + type: object + properties: + parent_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + description: | + Immediate parent with whom we will link our new customer(child) + example: future_billing + deprecated: false + payment_owner_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + description: | + Parent who is going to pay + example: active1 + deprecated: false + invoice_owner_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + description: | + Parent who is going to handle invoices + example: future_billing + deprecated: false + description: | + Parameters for relationship + deprecated: false + encoding: + customer: + style: deepObject + explode: true + relationship: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - export + type: object + properties: + export: + $ref: '#/components/schemas/Export' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /exports/attached_items: + post: + summary: Export Attached Items + description: | + This API triggers export of attached item data. The exported zip file contains CSV files with attached item-related data. + operationId: export_attached_items + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-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:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + item_type: + type: object + properties: + is: + type: string + description: | + \* \`plan\` - An essential component of a subscription. Every subscription has exactly one plan. It has a recurring charge and its period defines the billing period of the subscription. \* \`addon\` - A recurring component that can be added to a subscription in addition to its plan. \* \`charge\` - A non-recurring component that can be added to a subscription in addition to its plan. An charge can also be applied to a customer [directly](./invoices?prod_cat_ver=2#create_invoice_for_a_charge-item) without being applied to a subscription. + enum: + - plan + - addon + - charge + is_not: + type: string + description: | + \* \`plan\` - An essential component of a subscription. Every subscription has exactly one plan. It has a recurring charge and its period defines the billing period of the subscription. \* \`addon\` - A recurring component that can be added to a subscription in addition to its plan. \* \`charge\` - A non-recurring component that can be added to a subscription in addition to its plan. An charge can also be applied to a customer [directly](./invoices?prod_cat_ver=2#create_invoice_for_a_charge-item) without being applied to a subscription. + enum: + - plan + - addon + - charge + in: + pattern: "^\\[(plan|addon|charge)(,(plan|addon|charge))*\\]$" + type: string + not_in: + pattern: "^\\[(plan|addon|charge)(,(plan|addon|charge))*\\]$" + type: string + description: | + optional, enumerated string filter To filter based on the type of of the attached item. Possible values are : \`addon\`, \`charge\`. Possible values are : plan, addon, charge. \*\*Supported operators :\*\* is, is_not, in, not_in \*\*Example →\*\* \*item_type\\\[is_not\\\] = "plan"\* + example: plan + deprecated: false + attached_item: + type: object + properties: + id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + Filter attached items based on their id. + example: bec0c324-adb6-44d3-ad4f-694f449be97c + deprecated: false + item_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + Filter attached items based on the \`item_id\` of the item being attached. + example: basic + deprecated: false + type: + type: object + properties: + is: + type: string + description: | + \* \`recommended\` - The addon is recommended to go with the plan-item when using [Checkout](https://www.chargebee.com/docs/2.0/configure-inapp.html#fundamental-settings_recommending-addons-in-checkout) or [Portal](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html#allow-change-subscription). \* \`mandatory\` - The addon is attached automatically to the subscription for the plan-item unless [explicitly removed](./subscriptions?prod_cat_ver=2) via API. \* \`optional\` - The addon is neither mandatory, nor recommended. This allows you to attach an addon so you can specify a `quantity` and `billing_cycles` for the addon, for when it is applied to subscriptions with the plan. + enum: + - recommended + - mandatory + - optional + is_not: + type: string + description: | + \* \`recommended\` - The addon is recommended to go with the plan-item when using [Checkout](https://www.chargebee.com/docs/2.0/configure-inapp.html#fundamental-settings_recommending-addons-in-checkout) or [Portal](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html#allow-change-subscription). \* \`mandatory\` - The addon is attached automatically to the subscription for the plan-item unless [explicitly removed](./subscriptions?prod_cat_ver=2) via API. \* \`optional\` - The addon is neither mandatory, nor recommended. This allows you to attach an addon so you can specify a `quantity` and `billing_cycles` for the addon, for when it is applied to subscriptions with the plan. + enum: + - recommended + - mandatory + - optional + in: + pattern: "^\\[(recommended|mandatory|optional)(,(recommended|mandatory|optional))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(recommended|mandatory|optional)(,(recommended|mandatory|optional))*\\\ + ]$" + type: string + description: | + Filter attached items based on the \`type\` of attached item. Possible values are : \`recommended\`, \`mandatory\`, \`optional\`. + example: mandatory + deprecated: false + charge_on_event: + type: object + properties: + is: + type: string + description: | + \* \`subscription_creation\` - the time of creation of the subscription. \* \`subscription_trial_start\` - the time when the trial period of the subscription begins. \* \`plan_activation\` - same as subscription activation, but also includes the case when the plan-item of the subscription is changed. \* \`subscription_activation\` - the moment a subscription enters an `active` or `non-renewing` state. Also includes reactivations of canceled subscriptions. \* \`contract_termination\` - when a contract term is [terminated](./subscriptions?prod_cat_ver=2#cancel_subscription_for_items_contract_term_cancel_option). \* \`on_demand\` - Item can be charged on demand + enum: + - subscription_creation + - subscription_trial_start + - plan_activation + - subscription_activation + - contract_termination + - on_demand + is_not: + type: string + description: | + \* \`subscription_creation\` - the time of creation of the subscription. \* \`subscription_trial_start\` - the time when the trial period of the subscription begins. \* \`plan_activation\` - same as subscription activation, but also includes the case when the plan-item of the subscription is changed. \* \`subscription_activation\` - the moment a subscription enters an `active` or `non-renewing` state. Also includes reactivations of canceled subscriptions. \* \`contract_termination\` - when a contract term is [terminated](./subscriptions?prod_cat_ver=2#cancel_subscription_for_items_contract_term_cancel_option). \* \`on_demand\` - Item can be charged on demand + enum: + - subscription_creation + - subscription_trial_start + - plan_activation + - subscription_activation + - contract_termination + - on_demand + in: + pattern: "^\\[(subscription_creation|subscription_trial_start|plan_activation|subscription_activation|contract_termination|on_demand)(,(subscription_creation|subscription_trial_start|plan_activation|subscription_activation|contract_termination|on_demand))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(subscription_creation|subscription_trial_start|plan_activation|subscription_activation|contract_termination|on_demand)(,(subscription_creation|subscription_trial_start|plan_activation|subscription_activation|contract_termination|on_demand))*\\\ + ]$" + type: string + description: | + Indicates when the item is charged. This attribute only applies to charge-items. + example: subscription_creation + deprecated: false + updated_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + Filter attached items based on when the attached items were last updated. + example: "1243545465" + deprecated: false + parent_item_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + The id of the plan-item to which the item is attached. + example: silver + deprecated: false + description: | + Parameters for attached_item + deprecated: false + encoding: + attached_item: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - export + type: object + properties: + export: + $ref: '#/components/schemas/Export' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /exports/transactions: + post: + summary: Export Transactions + description: | + This API triggers export of transaction data. The exported zip file contains CSV files with transaction-related data. + operationId: export_transactions + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA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})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + transaction: + type: object + properties: + id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + Uniquely identifies the transaction. + example: txn_88ybdbsnvf2 + deprecated: false + customer_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + Identifier of the customer for which this transaction is made + example: 5hjdk8nOpd + deprecated: false + subscription_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + Identifier of the subscription for which this transaction is made. + example: 5hjdk8nOpd + deprecated: false + payment_source_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + To filter based on Transaction payment source id. + example: pm_3Nl8XXUQUXDVFa2 + deprecated: false + payment_method: + type: object + properties: + is: + type: string + description: | + \* \`card\` - Card \* \`cash\` - Cash \* \`check\` - Check \* \`chargeback\` - Only applicable for a transaction of [type](transactions#transaction_type) = `refund`. This value is set by Chargebee when an automated [chargeback](https://www.chargebee.com/docs/chargeback.html#chargeback-process) occurs. You can also set this explicitly when [recording a refund](transactions#record_an_offline_refund). \* \`bank_transfer\` - Bank Transfer \* \`amazon_payments\` - Amazon Payments \* \`paypal_express_checkout\` - Paypal Express Checkout \* \`direct_debit\` - Direct Debit \* \`alipay\` - Alipay \* \`unionpay\` - Unionpay \* \`apple_pay\` - Apple Pay \* \`wechat_pay\` - WeChat Pay \* \`ach_credit\` - ACH Credit \* \`sepa_credit\` - SEPA Credit \* \`ideal\` - IDEAL \* \`google_pay\` - Google Pay \* \`sofort\` - Sofort \* \`bancontact\` - Bancontact \* \`giropay\` - giropay \* \`dotpay\` - Dotpay \* \`other\` - Payment Methods other than the above types \* \`app_store\` - \*\*(Deprecated)\*\* App Store \* \`upi\` - upi \* \`netbanking_emandates\` - netbanking_emandates \* \`play_store\` - \*\*(Deprecated)\*\* Play Store \* \`custom\` - Custom \* \`boleto\` - boleto \* \`venmo\` - Venmo \* \`pay_to\` - PayTo \* \`faster_payments\` - Faster Payments \* \`sepa_instant_transfer\` - Sepa Instant Transfer \* \`automated_bank_transfer\` - Automated Bank Transfer \* \`klarna_pay_now\` - Klarna Pay Now + enum: + - card + - cash + - check + - chargeback + - bank_transfer + - amazon_payments + - paypal_express_checkout + - direct_debit + - alipay + - unionpay + - apple_pay + - wechat_pay + - ach_credit + - sepa_credit + - ideal + - google_pay + - sofort + - bancontact + - giropay + - dotpay + - other + - upi + - netbanking_emandates + - custom + - boleto + - venmo + - pay_to + - faster_payments + - sepa_instant_transfer + - automated_bank_transfer + - klarna_pay_now + is_not: + type: string + description: | + \* \`card\` - Card \* \`cash\` - Cash \* \`check\` - Check \* \`chargeback\` - Only applicable for a transaction of [type](transactions#transaction_type) = `refund`. This value is set by Chargebee when an automated [chargeback](https://www.chargebee.com/docs/chargeback.html#chargeback-process) occurs. You can also set this explicitly when [recording a refund](transactions#record_an_offline_refund). \* \`bank_transfer\` - Bank Transfer \* \`amazon_payments\` - Amazon Payments \* \`paypal_express_checkout\` - Paypal Express Checkout \* \`direct_debit\` - Direct Debit \* \`alipay\` - Alipay \* \`unionpay\` - Unionpay \* \`apple_pay\` - Apple Pay \* \`wechat_pay\` - WeChat Pay \* \`ach_credit\` - ACH Credit \* \`sepa_credit\` - SEPA Credit \* \`ideal\` - IDEAL \* \`google_pay\` - Google Pay \* \`sofort\` - Sofort \* \`bancontact\` - Bancontact \* \`giropay\` - giropay \* \`dotpay\` - Dotpay \* \`other\` - Payment Methods other than the above types \* \`app_store\` - \*\*(Deprecated)\*\* App Store \* \`upi\` - upi \* \`netbanking_emandates\` - netbanking_emandates \* \`play_store\` - \*\*(Deprecated)\*\* Play Store \* \`custom\` - Custom \* \`boleto\` - boleto \* \`venmo\` - Venmo \* \`pay_to\` - PayTo \* \`faster_payments\` - Faster Payments \* \`sepa_instant_transfer\` - Sepa Instant Transfer \* \`automated_bank_transfer\` - Automated Bank Transfer \* \`klarna_pay_now\` - Klarna Pay Now + enum: + - card + - cash + - check + - chargeback + - bank_transfer + - amazon_payments + - paypal_express_checkout + - direct_debit + - alipay + - unionpay + - apple_pay + - wechat_pay + - ach_credit + - sepa_credit + - ideal + - google_pay + - sofort + - bancontact + - giropay + - dotpay + - other + - upi + - netbanking_emandates + - custom + - boleto + - venmo + - pay_to + - faster_payments + - sepa_instant_transfer + - automated_bank_transfer + - klarna_pay_now + in: + pattern: "^\\[(card|cash|check|chargeback|bank_transfer|amazon_payments|paypal_express_checkout|direct_debit|alipay|unionpay|apple_pay|wechat_pay|ach_credit|sepa_credit|ideal|google_pay|sofort|bancontact|giropay|dotpay|other|app_store|upi|netbanking_emandates|play_store|custom|boleto|venmo|pay_to|faster_payments|sepa_instant_transfer|automated_bank_transfer|klarna_pay_now)(,(card|cash|check|chargeback|bank_transfer|amazon_payments|paypal_express_checkout|direct_debit|alipay|unionpay|apple_pay|wechat_pay|ach_credit|sepa_credit|ideal|google_pay|sofort|bancontact|giropay|dotpay|other|app_store|upi|netbanking_emandates|play_store|custom|boleto|venmo|pay_to|faster_payments|sepa_instant_transfer|automated_bank_transfer|klarna_pay_now))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(card|cash|check|chargeback|bank_transfer|amazon_payments|paypal_express_checkout|direct_debit|alipay|unionpay|apple_pay|wechat_pay|ach_credit|sepa_credit|ideal|google_pay|sofort|bancontact|giropay|dotpay|other|app_store|upi|netbanking_emandates|play_store|custom|boleto|venmo|pay_to|faster_payments|sepa_instant_transfer|automated_bank_transfer|klarna_pay_now)(,(card|cash|check|chargeback|bank_transfer|amazon_payments|paypal_express_checkout|direct_debit|alipay|unionpay|apple_pay|wechat_pay|ach_credit|sepa_credit|ideal|google_pay|sofort|bancontact|giropay|dotpay|other|app_store|upi|netbanking_emandates|play_store|custom|boleto|venmo|pay_to|faster_payments|sepa_instant_transfer|automated_bank_transfer|klarna_pay_now))*\\\ + ]$" + type: string + description: | + The payment method of this transaction + example: card + deprecated: false + gateway: + type: object + properties: + is: + type: string + description: | + \* \`chargebee\` - Chargebee test gateway. \* \`chargebee_payments\` - Chargebee Payments gateway \* \`stripe\` - Stripe is a payment gateway. \* \`wepay\` - WePay is a payment gateway. \* \`braintree\` - Braintree is a payment gateway. \* \`authorize_net\` - Authorize.net is a payment gateway \* \`paypal_pro\` - PayPal Pro Account is a payment gateway. \* \`pin\` - Pin is a payment gateway \* \`eway\` - eWAY Account is a payment gateway. \* \`eway_rapid\` - eWAY Rapid is a payment gateway. \* \`worldpay\` - WorldPay is a payment gateway \* \`balanced_payments\` - Balanced is a payment gateway \* \`beanstream\` - Bambora(formerly known as Beanstream) is a payment gateway. \* \`bluepay\` - BluePay is a payment gateway. \* \`elavon\` - Elavon Virtual Merchant is a payment solution. \* \`first_data_global\` - First Data Global Gateway Virtual Terminal Account \* \`hdfc\` - HDFC Account is a payment gateway. \* \`migs\` - MasterCard Internet Gateway Service payment gateway. \* \`nmi\` - NMI is a payment gateway. \* \`ogone\` - Ingenico ePayments (formerly known as Ogone) is a payment gateway. \* \`paymill\` - PAYMILL is a payment gateway. \* \`paypal_payflow_pro\` - PayPal Payflow Pro is a payment gateway. \* \`sage_pay\` - Sage Pay is a payment gateway. \* \`tco\` - 2Checkout is a payment gateway. \* \`wirecard\` - WireCard Account is a payment service provider. \* \`amazon_payments\` - Amazon Payments is a payment service provider. \* \`paypal_express_checkout\` - PayPal Express Checkout is a payment gateway. \* \`gocardless\` - GoCardless is a payment service provider. \* \`adyen\` - Adyen is a payment gateway. \* \`orbital\` - Chase Paymentech(Orbital) is a payment gateway. \* \`moneris_us\` - Moneris USA is a payment gateway. \* \`moneris\` - Moneris is a payment gateway. \* \`bluesnap\` - BlueSnap is a payment gateway. \* \`cybersource\` - CyberSource is a payment gateway. \* \`vantiv\` - Vantiv is a payment gateway. \* \`checkout_com\` - Checkout.com is a payment gateway. \* \`paypal\` - PayPal Commerce is a payment gateway. \* \`ingenico_direct\` - Worldline Online Payments is a payment gateway. \* \`exact\` - Exact Payments is a payment gateway. \* \`mollie\` - Mollie is a payment gateway. \* \`quickbooks\` - Intuit QuickBooks Payments gateway \* \`razorpay\` - Razorpay is a fast growing payment service provider in India working with all leading banks and support for major local payment methods including Netbanking, UPI etc. \* \`global_payments\` - Global Payments is a payment service provider. \* \`bank_of_america\` - Bank of America Gateway \* \`ecentric\` - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities. \* \`metrics_global\` - Metrics global is a leading payment service provider providing unified payment services in the US. \* \`windcave\` - Windcave provides an end to end payment processing solution in ANZ and other leading global markets. \* \`pay_com\` - Pay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes. \* \`ebanx\` - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion. \* \`dlocal\` - Dlocal provides payment solutions for global commerce by accepting local payment methods. \* \`nuvei\` - Nuvei is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. \* \`not_applicable\` - Indicates that payment gateway is not applicable for this resource. + enum: + - chargebee + - chargebee_payments + - stripe + - wepay + - braintree + - authorize_net + - paypal_pro + - pin + - eway + - eway_rapid + - worldpay + - balanced_payments + - beanstream + - bluepay + - elavon + - first_data_global + - hdfc + - migs + - nmi + - ogone + - paymill + - paypal_payflow_pro + - sage_pay + - tco + - wirecard + - amazon_payments + - paypal_express_checkout + - gocardless + - adyen + - orbital + - moneris_us + - moneris + - bluesnap + - cybersource + - vantiv + - checkout_com + - paypal + - ingenico_direct + - exact + - mollie + - quickbooks + - razorpay + - global_payments + - bank_of_america + - ecentric + - metrics_global + - windcave + - pay_com + - ebanx + - dlocal + - nuvei + - not_applicable + is_not: + type: string + description: | + \* \`chargebee\` - Chargebee test gateway. \* \`chargebee_payments\` - Chargebee Payments gateway \* \`stripe\` - Stripe is a payment gateway. \* \`wepay\` - WePay is a payment gateway. \* \`braintree\` - Braintree is a payment gateway. \* \`authorize_net\` - Authorize.net is a payment gateway \* \`paypal_pro\` - PayPal Pro Account is a payment gateway. \* \`pin\` - Pin is a payment gateway \* \`eway\` - eWAY Account is a payment gateway. \* \`eway_rapid\` - eWAY Rapid is a payment gateway. \* \`worldpay\` - WorldPay is a payment gateway \* \`balanced_payments\` - Balanced is a payment gateway \* \`beanstream\` - Bambora(formerly known as Beanstream) is a payment gateway. \* \`bluepay\` - BluePay is a payment gateway. \* \`elavon\` - Elavon Virtual Merchant is a payment solution. \* \`first_data_global\` - First Data Global Gateway Virtual Terminal Account \* \`hdfc\` - HDFC Account is a payment gateway. \* \`migs\` - MasterCard Internet Gateway Service payment gateway. \* \`nmi\` - NMI is a payment gateway. \* \`ogone\` - Ingenico ePayments (formerly known as Ogone) is a payment gateway. \* \`paymill\` - PAYMILL is a payment gateway. \* \`paypal_payflow_pro\` - PayPal Payflow Pro is a payment gateway. \* \`sage_pay\` - Sage Pay is a payment gateway. \* \`tco\` - 2Checkout is a payment gateway. \* \`wirecard\` - WireCard Account is a payment service provider. \* \`amazon_payments\` - Amazon Payments is a payment service provider. \* \`paypal_express_checkout\` - PayPal Express Checkout is a payment gateway. \* \`gocardless\` - GoCardless is a payment service provider. \* \`adyen\` - Adyen is a payment gateway. \* \`orbital\` - Chase Paymentech(Orbital) is a payment gateway. \* \`moneris_us\` - Moneris USA is a payment gateway. \* \`moneris\` - Moneris is a payment gateway. \* \`bluesnap\` - BlueSnap is a payment gateway. \* \`cybersource\` - CyberSource is a payment gateway. \* \`vantiv\` - Vantiv is a payment gateway. \* \`checkout_com\` - Checkout.com is a payment gateway. \* \`paypal\` - PayPal Commerce is a payment gateway. \* \`ingenico_direct\` - Worldline Online Payments is a payment gateway. \* \`exact\` - Exact Payments is a payment gateway. \* \`mollie\` - Mollie is a payment gateway. \* \`quickbooks\` - Intuit QuickBooks Payments gateway \* \`razorpay\` - Razorpay is a fast growing payment service provider in India working with all leading banks and support for major local payment methods including Netbanking, UPI etc. \* \`global_payments\` - Global Payments is a payment service provider. \* \`bank_of_america\` - Bank of America Gateway \* \`ecentric\` - Ecentric provides a seamless payment processing service in South Africa specializing on omnichannel capabilities. \* \`metrics_global\` - Metrics global is a leading payment service provider providing unified payment services in the US. \* \`windcave\` - Windcave provides an end to end payment processing solution in ANZ and other leading global markets. \* \`pay_com\` - Pay.com provides payment services focused on simplicity and hassle-free operations for businesses of all sizes. \* \`ebanx\` - EBANX is a payment gateway, enabling businesses to accept diverse local payment methods from various countries for increased market reach and conversion. \* \`dlocal\` - Dlocal provides payment solutions for global commerce by accepting local payment methods. \* \`nuvei\` - Nuvei is a secure and reliable payment processing solution that allows you to accept payments from customers and suitable for various types of businesses. \* \`not_applicable\` - Indicates that payment gateway is not applicable for this resource. + enum: + - chargebee + - chargebee_payments + - stripe + - wepay + - braintree + - authorize_net + - paypal_pro + - pin + - eway + - eway_rapid + - worldpay + - balanced_payments + - beanstream + - bluepay + - elavon + - first_data_global + - hdfc + - migs + - nmi + - ogone + - paymill + - paypal_payflow_pro + - sage_pay + - tco + - wirecard + - amazon_payments + - paypal_express_checkout + - gocardless + - adyen + - orbital + - moneris_us + - moneris + - bluesnap + - cybersource + - vantiv + - checkout_com + - paypal + - ingenico_direct + - exact + - mollie + - quickbooks + - razorpay + - global_payments + - bank_of_america + - ecentric + - metrics_global + - windcave + - pay_com + - ebanx + - dlocal + - nuvei + - not_applicable + in: + pattern: "^\\[(chargebee|chargebee_payments|stripe|wepay|braintree|authorize_net|paypal_pro|pin|eway|eway_rapid|worldpay|balanced_payments|beanstream|bluepay|elavon|first_data_global|hdfc|migs|nmi|ogone|paymill|paypal_payflow_pro|sage_pay|tco|wirecard|amazon_payments|paypal_express_checkout|gocardless|adyen|orbital|moneris_us|moneris|bluesnap|cybersource|vantiv|checkout_com|paypal|ingenico_direct|exact|mollie|quickbooks|razorpay|global_payments|bank_of_america|ecentric|metrics_global|windcave|pay_com|ebanx|dlocal|nuvei|not_applicable)(,(chargebee|chargebee_payments|stripe|wepay|braintree|authorize_net|paypal_pro|pin|eway|eway_rapid|worldpay|balanced_payments|beanstream|bluepay|elavon|first_data_global|hdfc|migs|nmi|ogone|paymill|paypal_payflow_pro|sage_pay|tco|wirecard|amazon_payments|paypal_express_checkout|gocardless|adyen|orbital|moneris_us|moneris|bluesnap|cybersource|vantiv|checkout_com|paypal|ingenico_direct|exact|mollie|quickbooks|razorpay|global_payments|bank_of_america|ecentric|metrics_global|windcave|pay_com|ebanx|dlocal|nuvei|not_applicable))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(chargebee|chargebee_payments|stripe|wepay|braintree|authorize_net|paypal_pro|pin|eway|eway_rapid|worldpay|balanced_payments|beanstream|bluepay|elavon|first_data_global|hdfc|migs|nmi|ogone|paymill|paypal_payflow_pro|sage_pay|tco|wirecard|amazon_payments|paypal_express_checkout|gocardless|adyen|orbital|moneris_us|moneris|bluesnap|cybersource|vantiv|checkout_com|paypal|ingenico_direct|exact|mollie|quickbooks|razorpay|global_payments|bank_of_america|ecentric|metrics_global|windcave|pay_com|ebanx|dlocal|nuvei|not_applicable)(,(chargebee|chargebee_payments|stripe|wepay|braintree|authorize_net|paypal_pro|pin|eway|eway_rapid|worldpay|balanced_payments|beanstream|bluepay|elavon|first_data_global|hdfc|migs|nmi|ogone|paymill|paypal_payflow_pro|sage_pay|tco|wirecard|amazon_payments|paypal_express_checkout|gocardless|adyen|orbital|moneris_us|moneris|bluesnap|cybersource|vantiv|checkout_com|paypal|ingenico_direct|exact|mollie|quickbooks|razorpay|global_payments|bank_of_america|ecentric|metrics_global|windcave|pay_com|ebanx|dlocal|nuvei|not_applicable))*\\\ + ]$" + type: string + description: | + Gateway through which this transaction was done. Applicable only for 'Card' Payment Method + example: stripe + deprecated: false + gateway_account_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + The gateway account used for this transaction + example: gw_3Nl9BNeQ7438Ks1 + deprecated: false + id_at_gateway: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + description: | + The id with which this transaction is referred in gateway. + example: txn_5678HJS89900 + deprecated: false + reference_number: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + The reference number for this transaction. For example, the check number when \[payment_method\](transactions#transaction_payment_method) = \`check\`. + example: cus_u239732 + deprecated: false + type: + type: object + properties: + is: + type: string + description: | + \* \`authorization\` - The transaction represents an authorization for capturing the [amount](transactions#transaction_amount) from the customer's [payment_source](payment_sources). \* \`payment\` - The transaction represents capture of [amount](transactions#transaction_amount) from the customer's [payment_source](payment_sources). \* \`refund\` - The transaction represents a refund of [amount](transactions#transaction_amount) to the customer's [payment_source](payment_sources). \* \`payment_reversal\` - Indicates a reversal transaction. + enum: + - authorization + - payment + - refund + - payment_reversal + is_not: + type: string + description: | + \* \`authorization\` - The transaction represents an authorization for capturing the [amount](transactions#transaction_amount) from the customer's [payment_source](payment_sources). \* \`payment\` - The transaction represents capture of [amount](transactions#transaction_amount) from the customer's [payment_source](payment_sources). \* \`refund\` - The transaction represents a refund of [amount](transactions#transaction_amount) to the customer's [payment_source](payment_sources). \* \`payment_reversal\` - Indicates a reversal transaction. + enum: + - authorization + - payment + - refund + - payment_reversal + in: + pattern: "^\\[(authorization|payment|refund|payment_reversal)(,(authorization|payment|refund|payment_reversal))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(authorization|payment|refund|payment_reversal)(,(authorization|payment|refund|payment_reversal))*\\\ + ]$" + type: string + description: | + Type of the transaction. + example: payment + deprecated: false + date: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + Indicates when this transaction occurred. + example: "1435054328" + deprecated: false + amount: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + Amount for this transaction. + example: "1200" + deprecated: false + amount_capturable: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + To filter based on transaction's unused authorized/blocked amount. + example: "1200" + deprecated: false + status: + type: object + properties: + is: + type: string + description: | + \* \`in_progress\` - Transaction is being processed by the gateway. This typically happens for [direct debit transactions](https://www.chargebee.com/docs/direct-debit-payments.html) or, in case of cards, refund transactions. Such transactions can take 2-7 days to complete, depending on the gateway and payment method. \* \`success\` - The transaction is successful. \* \`voided\` - The transaction got voided or authorization expired at gateway. \* \`failure\` - Transaction failed. Refer the 'error_code' and 'error_text' fields to know the reason for failure \* \`timeout\` - Transaction failed because of Gateway not accepting the connection. \* \`needs_attention\` - Connection with Gateway got terminated abruptly. So, status of this transaction needs to be resolved manually + enum: + - in_progress + - success + - voided + - failure + - timeout + - needs_attention + is_not: + type: string + description: | + \* \`in_progress\` - Transaction is being processed by the gateway. This typically happens for [direct debit transactions](https://www.chargebee.com/docs/direct-debit-payments.html) or, in case of cards, refund transactions. Such transactions can take 2-7 days to complete, depending on the gateway and payment method. \* \`success\` - The transaction is successful. \* \`voided\` - The transaction got voided or authorization expired at gateway. \* \`failure\` - Transaction failed. Refer the 'error_code' and 'error_text' fields to know the reason for failure \* \`timeout\` - Transaction failed because of Gateway not accepting the connection. \* \`needs_attention\` - Connection with Gateway got terminated abruptly. So, status of this transaction needs to be resolved manually + enum: + - in_progress + - success + - voided + - failure + - timeout + - needs_attention + in: + pattern: "^\\[(in_progress|success|voided|failure|timeout|needs_attention)(,(in_progress|success|voided|failure|timeout|needs_attention))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(in_progress|success|voided|failure|timeout|needs_attention)(,(in_progress|success|voided|failure|timeout|needs_attention))*\\\ + ]$" + type: string + description: | + The status of this transaction. + example: success + deprecated: false + updated_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + To filter based on \`updated_at\`. This attribute will be present only if the resource has been updated after 2016-09-28. It is advisable when using this filter, to pass the \`sort_by\` input parameter as \`updated_at\` for a faster response. + example: "1243545465" + deprecated: false + description: | + Parameters for transaction + deprecated: false + encoding: + transaction: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - export + type: object + properties: + export: + $ref: '#/components/schemas/Export' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /exports/differential_prices: + post: + summary: Export Differential Price + description: | + This API triggers export of differential price data. The exported zip file contains CSV files with differential price-related data. + operationId: export_differential_price + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(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fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + item_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + optional, string filter Item Id of Addon / Charge item price for which differential pricing is applied to. \*\*Supported operators :\*\* is, is_not, starts_with, in, not_in \*\*Example →\*\* \*item_id\\\[is\\\] = "day-pass"\* + example: day-pass + deprecated: false + differential_price: + type: object + properties: + item_price_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + The id of the item price (\`addon\` or \`charge\`) whose price should change according to the plan-item it is applied to. + example: day-pass-USD + deprecated: false + id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + A unique and immutable id for the differential price. It is auto-generated when the differential price is created. + example: defcc4f1-f21f-47f4-8019-beddb9beab5f + deprecated: false + parent_item_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + The id of the plan-item, in relation to which, the differential pricing for the addon or charge is defined. For example, this would be the id of the \*Standard\* or \*Enterprise\* plans-items mentioned in the \[examples above\](./differential_prices?prod_cat_ver=2). + example: basic + deprecated: false + description: | + Parameters for differential_price + deprecated: false + encoding: + differential_price: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - export + type: object + properties: + export: + $ref: '#/components/schemas/Export' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /exports/item_families: + post: + summary: Export Item Families + description: | + This API triggers export of item family data. The exported zip file contains CSV files with item family-related data. + operationId: export_item_families + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(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?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + item_family: + type: object + properties: + id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + The identifier for the item family. It is unique and immutable. + example: family-id + deprecated: false + name: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + description: | + A unique display name for the item family. This is visible only in Chargebee and not to customers. + example: family-name + deprecated: false + updated_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + When the item family was last updated. + example: "1243545465" + deprecated: false + description: | + Parameters for item_family + deprecated: false + encoding: + item_family: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - export + type: object + properties: + export: + $ref: '#/components/schemas/Export' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /exports/invoices: + post: + summary: Export Invoices + description: | + This API triggers export of invoice data. The exported zip file contains CSV files with invoice-related data. + operationId: export_invoices + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?: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))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + payment_owner: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + optional, string filter Payment owner of an invoice. \*\*Supported operators :\*\* is, is_not, starts_with, in, not_in \*\*Example →\*\* \*payment_owner\\\[is\\\] = "payment_customer"\* + example: payment_customer + deprecated: false + invoice: + type: object + properties: + id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + The invoice number. Acts as a identifier for invoice and typically generated sequentially. + example: INVOICE_654 + deprecated: false + subscription_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + To filter based on subscription_id. NOTE: Not to be used if \*consolidated invoicing\* is enabled. + example: 3bdjnDnsdQn + deprecated: false + customer_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + The identifier of the customer this invoice belongs to. + example: 3bdjnDnsdQn + deprecated: false + recurring: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Boolean indicating whether this invoice belongs to a subscription + example: "true" + deprecated: false + status: + type: object + properties: + is: + type: string + description: "\\* \\`paid\\` - Indicates a paid invoice.\ + \ \\* \\`posted\\` - Indicates the payment is not yet\ + \ collected and will be in this state till the due date\ + \ to indicate the due period \\* \\`payment_due\\` - Indicates\ + \ the payment is not yet collected and is being retried\ + \ as per retry settings. \\* \\`not_paid\\` - Indicates\ + \ the payment is not made and all attempts to collect\ + \ is failed. \\* \\`voided\\` - Indicates a voided invoice.\ + \ \\* \\`pending\\` - \nThe [invoice](/docs/api/invoices?prod_cat_ver=2#invoice_status)\ + \ is yet to be closed (sent for payment collection). An\ + \ invoice is generated with this `status` when it has\ + \ line items that belong to items that are `metered` or\ + \ when the `subscription.create_pending_invoices`attribute\ + \ is set to `true`. \nThe [invoice](/docs/api/invoices?prod_cat_ver=1#invoice_status)\ + \ is yet to be closed (sent for payment collection). All\ + \ invoices are generated with this `status` when [Metered\ + \ Billing](https://www.chargebee.com/docs/1.0/metered_billing.html)\ + \ is enabled for the site.\n" + enum: + - paid + - posted + - payment_due + - not_paid + - voided + - pending + is_not: + type: string + description: "\\* \\`paid\\` - Indicates a paid invoice.\ + \ \\* \\`posted\\` - Indicates the payment is not yet\ + \ collected and will be in this state till the due date\ + \ to indicate the due period \\* \\`payment_due\\` - Indicates\ + \ the payment is not yet collected and is being retried\ + \ as per retry settings. \\* \\`not_paid\\` - Indicates\ + \ the payment is not made and all attempts to collect\ + \ is failed. \\* \\`voided\\` - Indicates a voided invoice.\ + \ \\* \\`pending\\` - \nThe [invoice](/docs/api/invoices?prod_cat_ver=2#invoice_status)\ + \ is yet to be closed (sent for payment collection). An\ + \ invoice is generated with this `status` when it has\ + \ line items that belong to items that are `metered` or\ + \ when the `subscription.create_pending_invoices`attribute\ + \ is set to `true`. \nThe [invoice](/docs/api/invoices?prod_cat_ver=1#invoice_status)\ + \ is yet to be closed (sent for payment collection). All\ + \ invoices are generated with this `status` when [Metered\ + \ Billing](https://www.chargebee.com/docs/1.0/metered_billing.html)\ + \ is enabled for the site.\n" + enum: + - paid + - posted + - payment_due + - not_paid + - voided + - pending + in: + pattern: "^\\[(paid|posted|payment_due|not_paid|voided|pending)(,(paid|posted|payment_due|not_paid|voided|pending))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(paid|posted|payment_due|not_paid|voided|pending)(,(paid|posted|payment_due|not_paid|voided|pending))*\\\ + ]$" + type: string + description: | + Current status of this invoice. + example: paid + deprecated: false + price_type: + type: object + properties: + is: + type: string + description: | + \* \`tax_exclusive\` - All amounts in the document are exclusive of tax. \* \`tax_inclusive\` - All amounts in the document are inclusive of tax. + enum: + - tax_exclusive + - tax_inclusive + is_not: + type: string + description: | + \* \`tax_exclusive\` - All amounts in the document are exclusive of tax. \* \`tax_inclusive\` - All amounts in the document are inclusive of tax. + enum: + - tax_exclusive + - tax_inclusive + in: + pattern: "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\\ + ]$" + type: string + description: | + The price type of the invoice. + example: tax_exclusive + deprecated: false + date: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + The document date displayed on the invoice PDF. + example: "1394532759" + deprecated: false + paid_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + Timestamp indicating the date \\\& time this invoice got paid. + example: "1394532759" + deprecated: false + total: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + Invoiced amount displayed in cents; that is, a decimal point is not present between the whole number and the decimal part. For example, $499.99 is displayed as 49999, and so on. + example: "1000" + deprecated: false + amount_paid: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + Payments collected successfully for the invoice. This is the sum of \[linked_payments\[\]\](invoices#invoice_linked_payments)\`.txn_amount\` for all \`linked_payments\[\]\` that have \`txn_status\` as \`success\`. + example: "800" + deprecated: false + amount_adjusted: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + Total adjustments made against this invoice. + example: "100" + deprecated: false + credits_applied: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + Total credits applied against this invoice. + example: "100" + deprecated: false + amount_due: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + The unpaid amount that is due on the invoice. This is calculated as: \[total\](invoices#invoice_total) - \[amount_paid\](invoices#invoice_amount_paid) - sum of \[applied_credits\](invoices#invoice_applied_credits)\`.applied_amount\` - sum of \[adjustment_credit_notes\](invoices#invoice_adjustment_credit_notes)\`.cn_total\` - sum of \[linked_taxes_withheld\](invoices#invoice_linked_taxes_withheld)\`.amount\`. + example: "200" + deprecated: false + dunning_status: + type: object + properties: + is: + type: string + description: | + \* \`in_progress\` - Dunning is still in progress. \* \`exhausted\` - Maximum number of attempts have been made. \* \`stopped\` - Dunning has stopped for this invoice. \* \`success\` - Payment successfully collected during dunning process. + enum: + - in_progress + - exhausted + - stopped + - success + is_not: + type: string + description: | + \* \`in_progress\` - Dunning is still in progress. \* \`exhausted\` - Maximum number of attempts have been made. \* \`stopped\` - Dunning has stopped for this invoice. \* \`success\` - Payment successfully collected during dunning process. + enum: + - in_progress + - exhausted + - stopped + - success + in: + pattern: "^\\[(in_progress|exhausted|stopped|success)(,(in_progress|exhausted|stopped|success))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(in_progress|exhausted|stopped|success)(,(in_progress|exhausted|stopped|success))*\\\ + ]$" + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Current dunning status of the invoice. + example: in_progress + deprecated: false + updated_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + To filter based on \`updated_at\`. This attribute will be present only if the resource has been updated after 2016-09-28. It is advisable when using this filter, to pass the \`sort_by\` input parameter as \`updated_at\` for a faster response. + example: "1243545465" + deprecated: false + channel: + type: object + properties: + is: + type: string + description: "\\* \\`web\\` - The object was created (and\ + \ is maintained) for the web channel directly in Chargebee\ + \ via API or UI. \\* \\`app_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this\ + \ object via UI or API is disallowed. \\* \\`play_store\\\ + ` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of\ + \ this object via UI or API is disallowed. \n\nIn-App\ + \ Subscriptions is currently in early access. Contact\ + \ [eap@chargebee.com](mailto:eap@chargebee.com) for more\ + \ information.\n" + enum: + - web + - app_store + - play_store + is_not: + type: string + description: "\\* \\`web\\` - The object was created (and\ + \ is maintained) for the web channel directly in Chargebee\ + \ via API or UI. \\* \\`app_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this\ + \ object via UI or API is disallowed. \\* \\`play_store\\\ + ` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of\ + \ this object via UI or API is disallowed. \n\nIn-App\ + \ Subscriptions is currently in early access. Contact\ + \ [eap@chargebee.com](mailto:eap@chargebee.com) for more\ + \ information.\n" + enum: + - web + - app_store + - play_store + in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + description: | + The subscription channel this object originated from and is maintained in. + example: APP STORE + deprecated: false + description: | + Parameters for invoice + deprecated: false + encoding: + invoice: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - export + type: object + properties: + export: + $ref: '#/components/schemas/Export' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /exports/{export-id}: + get: + summary: Retrieve an export + description: | + This API gets the status of the export job initiated by the Exports API. If the export job is completed, the downloads resource will also be obtained in the API response. The returned URL in the downloads resource is secure and can be downloaded. The URL expires after 4 hours. Please note that this is a public URL, and can be downloaded by anyone with whom it's shared. + + **Note:** In case the export is in Failed or In-process state, then the downloads resource will not be available. + operationId: retrieve_an_export + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4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|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: export-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - export + type: object + properties: + export: + $ref: '#/components/schemas/Export' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /exports/price_variants: + post: + summary: Export Price Variants + description: | + This API triggers export of price variant data. The exported zip file contains CSV files with price variant-related data. + operationId: export_price_variants + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(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fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + price_variant: + type: object + properties: + id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + Filter variant based on their \[id\](#). + example: basic + deprecated: false + name: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + Filter variant based on their \`name\`s. + example: basic + deprecated: false + status: + type: object + properties: + is: + type: string + description: | + \* \`active\` - Active \* \`archived\` - Archived + enum: + - active + - archived + is_not: + type: string + description: | + \* \`active\` - Active \* \`archived\` - Archived + enum: + - active + - archived + in: + pattern: "^\\[(active|archived)(,(active|archived))*\\]$" + type: string + not_in: + pattern: "^\\[(active|archived)(,(active|archived))*\\]$" + type: string + description: | + Filter variant based on their \`status\`. + example: active + deprecated: false + updated_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + Filter product based on their \`updated time\`. + example: "1243545465" + deprecated: false + created_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + Filter product based on their \`created time\`. + example: "1243545465" + deprecated: false + description: | + Parameters for price_variant + deprecated: false + encoding: + price_variant: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - export + type: object + properties: + export: + $ref: '#/components/schemas/Export' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /exports/items: + post: + summary: Export Items + description: | + This API triggers export of item data. The exported zip file contains CSV files with item-related data. + operationId: export_items + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA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})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + item: + type: object + properties: + id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + Filter items based on item id. + example: basic + deprecated: false + item_family_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + Filter items based on \`item_family_id\`. + example: acme + deprecated: false + type: + type: object + properties: + is: + type: string + description: | + \* \`plan\` - An essential component of a subscription. Every subscription has exactly one plan. It has a recurring charge and its period defines the billing period of the subscription. \* \`addon\` - A recurring component that can be added to a subscription in addition to its plan. \* \`charge\` - A non-recurring component that can be added to a subscription in addition to its plan. An charge can also be applied to a customer [directly](./invoices?prod_cat_ver=2#create_invoice_for_a_charge-item) without being applied to a subscription. + enum: + - plan + - addon + - charge + is_not: + type: string + description: | + \* \`plan\` - An essential component of a subscription. Every subscription has exactly one plan. It has a recurring charge and its period defines the billing period of the subscription. \* \`addon\` - A recurring component that can be added to a subscription in addition to its plan. \* \`charge\` - A non-recurring component that can be added to a subscription in addition to its plan. An charge can also be applied to a customer [directly](./invoices?prod_cat_ver=2#create_invoice_for_a_charge-item) without being applied to a subscription. + enum: + - plan + - addon + - charge + in: + pattern: "^\\[(plan|addon|charge)(,(plan|addon|charge))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(plan|addon|charge)(,(plan|addon|charge))*\\\ + ]$" + type: string + description: | + Filter items based on item \`type\`. + example: plan + deprecated: false + name: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + description: | + Filter items based on item \`name\`. + example: basic + deprecated: false + item_applicability: + type: object + properties: + is: + type: string + description: | + \* \`all\` - all addon-items and charge-items are applicable to this plan-item. \* \`restricted\` - only the addon-items or charge-items provided in `applicable_items` can be applied to this plan-item. + enum: + - all + - restricted + is_not: + type: string + description: | + \* \`all\` - all addon-items and charge-items are applicable to this plan-item. \* \`restricted\` - only the addon-items or charge-items provided in `applicable_items` can be applied to this plan-item. + enum: + - all + - restricted + in: + pattern: "^\\[(all|restricted)(,(all|restricted))*\\]$" + type: string + not_in: + pattern: "^\\[(all|restricted)(,(all|restricted))*\\]$" + type: string + description: | + Filter items based on \`item_applicability\`. + example: all + deprecated: false + status: + type: object + properties: + is: + type: string + description: | + \* \`active\` - The item can be used to create new item prices. \* \`archived\` - The item is no longer active and no new item prices can be created \* \`deleted\` - Indicates that the item has been [deleted](./items?prod_cat_ver=2#delete_an_item). The `id` and `name` can be reused. Deleted items can be retrieved using [List items](./items?prod_cat_ver=2#list_items). + enum: + - active + - archived + - deleted + is_not: + type: string + description: | + \* \`active\` - The item can be used to create new item prices. \* \`archived\` - The item is no longer active and no new item prices can be created \* \`deleted\` - Indicates that the item has been [deleted](./items?prod_cat_ver=2#delete_an_item). The `id` and `name` can be reused. Deleted items can be retrieved using [List items](./items?prod_cat_ver=2#list_items). + enum: + - active + - archived + - deleted + in: + pattern: "^\\[(active|archived|deleted)(,(active|archived|deleted))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(active|archived|deleted)(,(active|archived|deleted))*\\\ + ]$" + type: string + description: | + Filter items based on item \`status\`. + example: active + deprecated: false + is_giftable: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Specifies if gift subscriptions can be created for this item. + example: "true" + deprecated: false + updated_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + Filter items based on when the items were last updated. + example: "1243545465" + deprecated: false + enabled_for_checkout: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Allow the plan to subscribed to via Checkout. Applies only for plan-items. \*\*Note:\*\* Only the in-app version of Checkout is supported for Product Catalog v2. + deprecated: false + example: null + enabled_in_portal: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Allow customers to change their subscription to this plan via the \[Self-Serve Portal\](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html). Applies only for plan-items. This requires the Portal configuration to \[allow changing subscriptions\](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html#allow-change-subscription). + deprecated: false + example: null + metered: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Specifies whether the item undergoes metered billing. When \`true\`, the quantity is calculated from \[usage records\](/docs/api/usages?prod_cat_ver=2). When \`false\`, the \`quantity\` is as determined while adding an item price to the subscription. Applicable only for items of \`type\` \`plan\` or \`addon\` and when \[Metered Billing\](https://www.chargebee.com/docs/2.0/metered_billing.html) is enabled. The value of this attribute cannot be changed. + example: "true" + deprecated: false + usage_calculation: + type: object + properties: + is: + type: string + description: | + \* \`sum_of_usages\` - the net quantity is the sum of the `quantity` of all usages for the current term. \* \`last_usage\` - from among the usage records for the [item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) with `usage_date` within the relevant billing period, the `quantity` of the usage record with the most recent `usage_date` is taken as the net quantity consumed. \* \`max_usage\` - from among the usage records for the [item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) with `usage_date` within the relevant billing period, the `quantity` of the usage record with the maximum value is taken as the net quantity consumed. + enum: + - sum_of_usages + - last_usage + - max_usage + is_not: + type: string + description: | + \* \`sum_of_usages\` - the net quantity is the sum of the `quantity` of all usages for the current term. \* \`last_usage\` - from among the usage records for the [item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) with `usage_date` within the relevant billing period, the `quantity` of the usage record with the most recent `usage_date` is taken as the net quantity consumed. \* \`max_usage\` - from among the usage records for the [item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) with `usage_date` within the relevant billing period, the `quantity` of the usage record with the maximum value is taken as the net quantity consumed. + enum: + - sum_of_usages + - last_usage + - max_usage + in: + pattern: "^\\[(sum_of_usages|last_usage|max_usage)(,(sum_of_usages|last_usage|max_usage))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(sum_of_usages|last_usage|max_usage)(,(sum_of_usages|last_usage|max_usage))*\\\ + ]$" + type: string + description: | + How the quantity is calculated from usage data for the item prices belonging to this item. Only applicable when the item is \`metered\`. This value overrides the one \[set at the site level\](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing). + example: SUM_OF_USAGES + deprecated: false + channel: + type: object + properties: + is: + type: string + description: "\\* \\`web\\` - The object was created (and\ + \ is maintained) for the web channel directly in Chargebee\ + \ via API or UI. \\* \\`app_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this\ + \ object via UI or API is disallowed. \\* \\`play_store\\\ + ` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of\ + \ this object via UI or API is disallowed. \n\nIn-App\ + \ Subscriptions is currently in early access. Contact\ + \ [eap@chargebee.com](mailto:eap@chargebee.com) for more\ + \ information.\n" + enum: + - web + - app_store + - play_store + is_not: + type: string + description: "\\* \\`web\\` - The object was created (and\ + \ is maintained) for the web channel directly in Chargebee\ + \ via API or UI. \\* \\`app_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this\ + \ object via UI or API is disallowed. \\* \\`play_store\\\ + ` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of\ + \ this object via UI or API is disallowed. \n\nIn-App\ + \ Subscriptions is currently in early access. Contact\ + \ [eap@chargebee.com](mailto:eap@chargebee.com) for more\ + \ information.\n" + enum: + - web + - app_store + - play_store + in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + description: | + The subscription channel this object originated from and is maintained in. + example: APP STORE + deprecated: false + description: | + Parameters for item + deprecated: false + encoding: + item: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - export + type: object + properties: + export: + $ref: '#/components/schemas/Export' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /exports/deferred_revenue: + post: + summary: Export Deferred Revenue Reports + description: | + **Important:** + + This report is deprecated. Therefore, the endpoint is also deprecated. + + This API triggers export for the Deferred Revenue Report. + + **Note:** This API call is asynchronous. You need to check if this operation has completed by checking if the export status is **completed** . You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. In case you are using any of the client libraries, use the **wait for export completion** function provided as an instance method in the library. You need to check if this operation has completed by checking if the export status is **completed** . You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method **waitForExportCompletion()** on the returned **Export** resource which will wait until the export status changes. You need to check if this operation has completed by checking if the export status is **completed** . You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method **waitForExportCompletion()** on the returned **Export** resource which will wait until the export status changes. You need to check if this operation has completed by checking if the export status is **completed** . You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method **wait_for_export_completion** on the returned **export** resource which will wait until the export status changes. You need to check if this operation has completed by checking if the export status is **completed** . You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method **wait_for_export_completion** on the returned **export** resource which will wait until the export status changes. You need to check if this operation has completed by checking if the export status is **completed** . You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method **WaitForExportCompletion** on the returned **Export** resource which will wait until the export status changes. You need to check if this operation has completed by checking if the export status is **completed** . You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method **wait_for_export_completion** on the returned **export** resource which wait until the export status changes. You need to check if this operation has completed by checking if the export status is **completed** . You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method **wait_for_export_completion** on the returned **export** resource which wait until the export status changes. + operationId: export_deferred_revenue_reports + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-f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1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - report_by + - report_from_month + - report_from_year + - report_to_month + - report_to_year + type: object + properties: + report_by: + type: string + description: | + Determines the scope of the report. Returns the report based on the value specified. \* subscription - Subscription \* invoice - Invoice \* product - Product (Includes Plan, Addon and Adhoc) \* customer - Customer + deprecated: false + enum: + - customer + - invoice + - product + - subscription + currency_code: + maxLength: 3 + type: string + description: | + Value must be in ISO 4217 format. Generates the report based on the value specified. If no currency_code value is specified, then consolidated report based on base currency is returned. + deprecated: false + report_from_month: + type: integer + description: | + Obtains report data from the specified month, combined with the value specified for report_from_year.Values must be between 1 and 12, where 1 is January and 12 is December. + format: int32 + deprecated: false + report_from_year: + type: integer + description: | + Obtains report data from the specified year, combined with the value specified for report_from_month. + format: int32 + deprecated: false + report_to_month: + type: integer + description: | + Obtains report data from the specified month, combined with the value specified for report_to_year.Values must be between 1 and 12, where 1 is January and 12 is December. + format: int32 + deprecated: false + report_to_year: + type: integer + description: | + Obtains report data until the specified year, combined with the value specified for report_to_month. + format: int32 + deprecated: false + include_discounts: + type: boolean + description: | + Returns amount with discount in the report. If value specified is false, it returns amount without discount. + deprecated: false + default: true + payment_owner: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + optional, string filter Payment owner of an invoice. \*\*Supported operators :\*\* is, is_not, starts_with, in, not_in \*\*Example →\*\* \*payment_owner\\\[is\\\] = "payment_customer"\* + example: payment_customer + deprecated: false + item_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + optional, string filter The plan item code. \*\*Supported operators :\*\* is, is_not, starts_with, in, not_in \*\*Example →\*\* \*item_id\\\[is\\\] = "silver"\* + example: silver + deprecated: false + item_price_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + optional, string filter The plan item price code. \*\*Supported operators :\*\* is, is_not, starts_with, in, not_in \*\*Example →\*\* \*item_price_id\\\[is\\\] = "silver-USD-monthly"\* + example: silver-USD-monthly + deprecated: false + cancel_reason_code: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + optional, string filter Reason code for canceling the subscription. Must be one from a list of reason codes set in the Chargebee app in \*\*Settings \\\> Configure Chargebee \\\> Reason Codes \\\> Subscriptions \\\> Subscription Cancellation\*\* . Must be passed if set as mandatory in the app. The codes are case-sensitive. \*\*Supported operators :\*\* is, is_not, starts_with, in, not_in \*\*Example →\*\* \*cancel_reason_code\\\[is\\\] = "Not Paid"\* + example: Not Paid + deprecated: false + business_entity_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + description: | + optional, string filter The unique ID of the \[business entity\](/docs/api?prod_cat_ver=2#mbe) of this subscription. This is always the same as the \[business entity\](/docs/api/subscriptions?prod_cat_ver=2#subscription_customer_id) of the customer. \*\*Supported operators :\*\* is, is_not, starts_with \*\*Example →\*\* \*business_entity_id\\\[is_not\\\] = "business_entity_id"\* + example: business_entity_id + deprecated: false + invoice: + type: object + properties: + id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + The invoice number. Acts as a identifier for invoice and typically generated sequentially. + example: INVOICE_654 + deprecated: false + recurring: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Boolean indicating whether this invoice belongs to a subscription + example: "true" + deprecated: false + status: + type: object + properties: + is: + type: string + description: "\\* \\`paid\\` - Indicates a paid invoice.\ + \ \\* \\`posted\\` - Indicates the payment is not yet\ + \ collected and will be in this state till the due date\ + \ to indicate the due period \\* \\`payment_due\\` - Indicates\ + \ the payment is not yet collected and is being retried\ + \ as per retry settings. \\* \\`not_paid\\` - Indicates\ + \ the payment is not made and all attempts to collect\ + \ is failed. \\* \\`voided\\` - Indicates a voided invoice.\ + \ \\* \\`pending\\` - \nThe [invoice](/docs/api/invoices?prod_cat_ver=2#invoice_status)\ + \ is yet to be closed (sent for payment collection). An\ + \ invoice is generated with this `status` when it has\ + \ line items that belong to items that are `metered` or\ + \ when the `subscription.create_pending_invoices`attribute\ + \ is set to `true`. \nThe [invoice](/docs/api/invoices?prod_cat_ver=1#invoice_status)\ + \ is yet to be closed (sent for payment collection). All\ + \ invoices are generated with this `status` when [Metered\ + \ Billing](https://www.chargebee.com/docs/1.0/metered_billing.html)\ + \ is enabled for the site.\n" + enum: + - paid + - posted + - payment_due + - not_paid + - voided + - pending + is_not: + type: string + description: "\\* \\`paid\\` - Indicates a paid invoice.\ + \ \\* \\`posted\\` - Indicates the payment is not yet\ + \ collected and will be in this state till the due date\ + \ to indicate the due period \\* \\`payment_due\\` - Indicates\ + \ the payment is not yet collected and is being retried\ + \ as per retry settings. \\* \\`not_paid\\` - Indicates\ + \ the payment is not made and all attempts to collect\ + \ is failed. \\* \\`voided\\` - Indicates a voided invoice.\ + \ \\* \\`pending\\` - \nThe [invoice](/docs/api/invoices?prod_cat_ver=2#invoice_status)\ + \ is yet to be closed (sent for payment collection). An\ + \ invoice is generated with this `status` when it has\ + \ line items that belong to items that are `metered` or\ + \ when the `subscription.create_pending_invoices`attribute\ + \ is set to `true`. \nThe [invoice](/docs/api/invoices?prod_cat_ver=1#invoice_status)\ + \ is yet to be closed (sent for payment collection). All\ + \ invoices are generated with this `status` when [Metered\ + \ Billing](https://www.chargebee.com/docs/1.0/metered_billing.html)\ + \ is enabled for the site.\n" + enum: + - paid + - posted + - payment_due + - not_paid + - voided + - pending + in: + pattern: "^\\[(paid|posted|payment_due|not_paid|voided|pending)(,(paid|posted|payment_due|not_paid|voided|pending))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(paid|posted|payment_due|not_paid|voided|pending)(,(paid|posted|payment_due|not_paid|voided|pending))*\\\ + ]$" + type: string + description: | + Current status of this invoice. + example: paid + deprecated: false + price_type: + type: object + properties: + is: + type: string + description: | + \* \`tax_exclusive\` - All amounts in the document are exclusive of tax. \* \`tax_inclusive\` - All amounts in the document are inclusive of tax. + enum: + - tax_exclusive + - tax_inclusive + is_not: + type: string + description: | + \* \`tax_exclusive\` - All amounts in the document are exclusive of tax. \* \`tax_inclusive\` - All amounts in the document are inclusive of tax. + enum: + - tax_exclusive + - tax_inclusive + in: + pattern: "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\\ + ]$" + type: string + description: | + The price type of the invoice. + example: tax_exclusive + deprecated: false + date: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + The document date displayed on the invoice PDF. + example: "1394532759" + deprecated: false + paid_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + Timestamp indicating the date \\\& time this invoice got paid. + example: "1394532759" + deprecated: false + total: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + Invoiced amount displayed in cents; that is, a decimal point is not present between the whole number and the decimal part. For example, $499.99 is displayed as 49999, and so on. + example: "1000" + deprecated: false + amount_paid: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + Payments collected successfully for the invoice. This is the sum of \[linked_payments\[\]\](invoices#invoice_linked_payments)\`.txn_amount\` for all \`linked_payments\[\]\` that have \`txn_status\` as \`success\`. + example: "800" + deprecated: false + amount_adjusted: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + Total adjustments made against this invoice. + example: "100" + deprecated: false + credits_applied: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + Total credits applied against this invoice. + example: "100" + deprecated: false + amount_due: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + The unpaid amount that is due on the invoice. This is calculated as: \[total\](invoices#invoice_total) - \[amount_paid\](invoices#invoice_amount_paid) - sum of \[applied_credits\](invoices#invoice_applied_credits)\`.applied_amount\` - sum of \[adjustment_credit_notes\](invoices#invoice_adjustment_credit_notes)\`.cn_total\` - sum of \[linked_taxes_withheld\](invoices#invoice_linked_taxes_withheld)\`.amount\`. + example: "200" + deprecated: false + dunning_status: + type: object + properties: + is: + type: string + description: | + \* \`in_progress\` - Dunning is still in progress. \* \`exhausted\` - Maximum number of attempts have been made. \* \`stopped\` - Dunning has stopped for this invoice. \* \`success\` - Payment successfully collected during dunning process. + enum: + - in_progress + - exhausted + - stopped + - success + is_not: + type: string + description: | + \* \`in_progress\` - Dunning is still in progress. \* \`exhausted\` - Maximum number of attempts have been made. \* \`stopped\` - Dunning has stopped for this invoice. \* \`success\` - Payment successfully collected during dunning process. + enum: + - in_progress + - exhausted + - stopped + - success + in: + pattern: "^\\[(in_progress|exhausted|stopped|success)(,(in_progress|exhausted|stopped|success))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(in_progress|exhausted|stopped|success)(,(in_progress|exhausted|stopped|success))*\\\ + ]$" + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Current dunning status of the invoice. + example: in_progress + deprecated: false + updated_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + To filter based on \`updated_at\`. This attribute will be present only if the resource has been updated after 2016-09-28. It is advisable when using this filter, to pass the \`sort_by\` input parameter as \`updated_at\` for a faster response. + example: "1243545465" + deprecated: false + channel: + type: object + properties: + is: + type: string + description: "\\* \\`web\\` - The object was created (and\ + \ is maintained) for the web channel directly in Chargebee\ + \ via API or UI. \\* \\`app_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this\ + \ object via UI or API is disallowed. \\* \\`play_store\\\ + ` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of\ + \ this object via UI or API is disallowed. \n\nIn-App\ + \ Subscriptions is currently in early access. Contact\ + \ [eap@chargebee.com](mailto:eap@chargebee.com) for more\ + \ information.\n" + enum: + - web + - app_store + - play_store + is_not: + type: string + description: "\\* \\`web\\` - The object was created (and\ + \ is maintained) for the web channel directly in Chargebee\ + \ via API or UI. \\* \\`app_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this\ + \ object via UI or API is disallowed. \\* \\`play_store\\\ + ` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of\ + \ this object via UI or API is disallowed. \n\nIn-App\ + \ Subscriptions is currently in early access. Contact\ + \ [eap@chargebee.com](mailto:eap@chargebee.com) for more\ + \ information.\n" + enum: + - web + - app_store + - play_store + in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + description: | + The subscription channel this object originated from and is maintained in. + example: APP STORE + deprecated: false + description: | + Parameters for invoice + deprecated: false + subscription: + type: object + properties: + id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + A unique and immutable identifier for the subscription. If not provided, it is autogenerated. + example: 8gsnbYfsMLds + deprecated: false + customer_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + Identifier of the customer with whom this subscription is associated. + example: 8gsnbYfsMLds + deprecated: false + status: + type: object + properties: + is: + type: string + description: | + \* \`future\` - The subscription is scheduled to start at a future date. \* \`in_trial\` - The subscription is in trial. \* \`active\` - The subscription is active and will be charged for automatically based on the items in it. \* \`non_renewing\` - The subscription will be canceled at the end of the current term. \* \`paused\` - The subscription is [paused](https://www.chargebee.com/docs/2.0/pause-subscription.html). The subscription will not renew while in this state. \* \`cancelled\` - The subscription has been canceled and is no longer in service. \* \`transferred\` - The subscription has been transferred to another business entity within the organization. + enum: + - future + - in_trial + - active + - non_renewing + - paused + - cancelled + - transferred + is_not: + type: string + description: | + \* \`future\` - The subscription is scheduled to start at a future date. \* \`in_trial\` - The subscription is in trial. \* \`active\` - The subscription is active and will be charged for automatically based on the items in it. \* \`non_renewing\` - The subscription will be canceled at the end of the current term. \* \`paused\` - The subscription is [paused](https://www.chargebee.com/docs/2.0/pause-subscription.html). The subscription will not renew while in this state. \* \`cancelled\` - The subscription has been canceled and is no longer in service. \* \`transferred\` - The subscription has been transferred to another business entity within the organization. + enum: + - future + - in_trial + - active + - non_renewing + - paused + - cancelled + - transferred + in: + pattern: "^\\[(future|in_trial|active|non_renewing|paused|cancelled|transferred)(,(future|in_trial|active|non_renewing|paused|cancelled|transferred))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(future|in_trial|active|non_renewing|paused|cancelled|transferred)(,(future|in_trial|active|non_renewing|paused|cancelled|transferred))*\\\ + ]$" + type: string + description: | + Current state of the subscription + example: active + deprecated: false + cancel_reason: + type: object + properties: + is: + type: string + description: | + \* \`not_paid\` - Not Paid \* \`no_card\` - No Card \* \`fraud_review_failed\` - Fraud Review Failed \* \`non_compliant_eu_customer\` - Non Compliant EU Customer \* \`tax_calculation_failed\` - Tax Calculation Failed \* \`currency_incompatible_with_gateway\` - Currency incompatible with Gateway \* \`non_compliant_customer\` - Non Compliant Customer + enum: + - not_paid + - no_card + - fraud_review_failed + - non_compliant_eu_customer + - tax_calculation_failed + - currency_incompatible_with_gateway + - non_compliant_customer + is_not: + type: string + description: | + \* \`not_paid\` - Not Paid \* \`no_card\` - No Card \* \`fraud_review_failed\` - Fraud Review Failed \* \`non_compliant_eu_customer\` - Non Compliant EU Customer \* \`tax_calculation_failed\` - Tax Calculation Failed \* \`currency_incompatible_with_gateway\` - Currency incompatible with Gateway \* \`non_compliant_customer\` - Non Compliant Customer + enum: + - not_paid + - no_card + - fraud_review_failed + - non_compliant_eu_customer + - tax_calculation_failed + - currency_incompatible_with_gateway + - non_compliant_customer + in: + pattern: "^\\[(not_paid|no_card|fraud_review_failed|non_compliant_eu_customer|tax_calculation_failed|currency_incompatible_with_gateway|non_compliant_customer)(,(not_paid|no_card|fraud_review_failed|non_compliant_eu_customer|tax_calculation_failed|currency_incompatible_with_gateway|non_compliant_customer))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(not_paid|no_card|fraud_review_failed|non_compliant_eu_customer|tax_calculation_failed|currency_incompatible_with_gateway|non_compliant_customer)(,(not_paid|no_card|fraud_review_failed|non_compliant_eu_customer|tax_calculation_failed|currency_incompatible_with_gateway|non_compliant_customer))*\\\ + ]$" + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + The reason for canceling the subscription. Set by Chargebee automatically. + example: not_paid + deprecated: false + remaining_billing_cycles: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + \* When the subscription is not on a contract term: this value is the number of billing cycles remaining after the current cycle, at the end of which, the subscription cancels. \* When the subscription is on a \[contract term\](contract_terms): this value is the number of billing cycles remaining in the contract term after the current billing cycle. + example: "3" + deprecated: false + created_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + The time at which the subscription was created. + example: "1435054328" + deprecated: false + activated_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Time at which the subscription \`status\` last changed to \`active\`. For example, this value is updated when an \`in_trial\` or \`cancelled\` subscription activates. + example: "1435054328" + deprecated: false + next_billing_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + The date/time at which the next billing for the subscription happens. This is usually right after \`current_term_end\` unless multiple subscription terms were invoiced in advance using the \`terms_to_charge\` parameter. + example: "1435054328" + deprecated: false + cancelled_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + Time at which subscription was cancelled or is set to be cancelled. + example: "1435054328" + deprecated: false + has_scheduled_changes: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + If \`true\`, there are subscription changes scheduled on next renewal. + example: "true" + deprecated: false + updated_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + To filter based on \`updated_at\`. This attribute will be present only if the resource has been updated after 2016-09-28. It is advisable when using this filter, to pass the \`sort_by\` input parameter as \`updated_at\` for a faster response. + example: "1243545465" + deprecated: false + offline_payment_method: + type: object + properties: + is: + type: string + description: | + \* \`no_preference\` - No Preference \* \`cash\` - Cash \* \`check\` - Check \* \`bank_transfer\` - Bank Transfer \* \`ach_credit\` - ACH Credit \* \`sepa_credit\` - SEPA Credit \* \`boleto\` - Boleto \* \`us_automated_bank_transfer\` - US Automated Bank Transfer \* \`eu_automated_bank_transfer\` - EU Automated Bank Transfer \* \`uk_automated_bank_transfer\` - UK Automated Bank Transfer \* \`jp_automated_bank_transfer\` - JP Automated Bank Transfer \* \`mx_automated_bank_transfer\` - MX Automated Bank Transfer \* \`custom\` - Custom + enum: + - no_preference + - cash + - check + - bank_transfer + - ach_credit + - sepa_credit + - boleto + - us_automated_bank_transfer + - eu_automated_bank_transfer + - uk_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + - custom + is_not: + type: string + description: | + \* \`no_preference\` - No Preference \* \`cash\` - Cash \* \`check\` - Check \* \`bank_transfer\` - Bank Transfer \* \`ach_credit\` - ACH Credit \* \`sepa_credit\` - SEPA Credit \* \`boleto\` - Boleto \* \`us_automated_bank_transfer\` - US Automated Bank Transfer \* \`eu_automated_bank_transfer\` - EU Automated Bank Transfer \* \`uk_automated_bank_transfer\` - UK Automated Bank Transfer \* \`jp_automated_bank_transfer\` - JP Automated Bank Transfer \* \`mx_automated_bank_transfer\` - MX Automated Bank Transfer \* \`custom\` - Custom + enum: + - no_preference + - cash + - check + - bank_transfer + - ach_credit + - sepa_credit + - boleto + - us_automated_bank_transfer + - eu_automated_bank_transfer + - uk_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + - custom + in: + pattern: "^\\[(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom)(,(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom)(,(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom))*\\\ + ]$" + type: string + description: | + The preferred offline payment method for the subscription. + example: cash + deprecated: false + auto_close_invoices: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Set to \`false\` to override for this subscription, the \[site-level setting\](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing) for auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute has a higher precedence than the same attribute at the \[customer level\](/docs/api/customers?prod_cat_ver=2#customer_auto_close_invoices). + example: "true" + deprecated: false + channel: + type: object + properties: + is: + type: string + description: "\\* \\`web\\` - The object was created (and\ + \ is maintained) for the web channel directly in Chargebee\ + \ via API or UI. \\* \\`app_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this\ + \ object via UI or API is disallowed. \\* \\`play_store\\\ + ` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of\ + \ this object via UI or API is disallowed. \n\nIn-App\ + \ Subscriptions is currently in early access. Contact\ + \ [eap@chargebee.com](mailto:eap@chargebee.com) for more\ + \ information.\n" + enum: + - web + - app_store + - play_store + is_not: + type: string + description: "\\* \\`web\\` - The object was created (and\ + \ is maintained) for the web channel directly in Chargebee\ + \ via API or UI. \\* \\`app_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this\ + \ object via UI or API is disallowed. \\* \\`play_store\\\ + ` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of\ + \ this object via UI or API is disallowed. \n\nIn-App\ + \ Subscriptions is currently in early access. Contact\ + \ [eap@chargebee.com](mailto:eap@chargebee.com) for more\ + \ information.\n" + enum: + - web + - app_store + - play_store + in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + description: | + The subscription channel this object originated from and is maintained in. + example: APP STORE + deprecated: false + description: | + Parameters for subscription + deprecated: false + customer: + type: object + properties: + id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + Identifier of the customer. + example: 9bsvnHgsvmsI + deprecated: false + first_name: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + First name of the customer + example: John + deprecated: false + last_name: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Last name of the customer + example: Clint + deprecated: false + email: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Email of the customer. Configured email notifications will be sent to this email. + example: john@test.com + deprecated: false + company: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Company name of the customer. + example: Globex Corp + deprecated: false + phone: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Phone number of the customer + example: (541) 754-3010 + deprecated: false + auto_collection: + type: object + properties: + is: + type: string + description: | + \* \`on\` - Whenever an invoice is created, an automatic attempt to charge the customer's payment method is made. \* \`off\` - Automatic collection of charges will not be made. All payments must be recorded offline. + enum: + - "on" + - "off" + is_not: + type: string + description: | + \* \`on\` - Whenever an invoice is created, an automatic attempt to charge the customer's payment method is made. \* \`off\` - Automatic collection of charges will not be made. All payments must be recorded offline. + enum: + - "on" + - "off" + in: + pattern: "^\\[(on|off)(,(on|off))*\\]$" + type: string + not_in: + pattern: "^\\[(on|off)(,(on|off))*\\]$" + type: string + description: | + Whether payments needs to be collected automatically for this customer + example: "on" + deprecated: false + taxability: + type: object + properties: + is: + type: string + description: | + \* \`taxable\` - Computes tax for the customer based on the [site configuration](https://www.chargebee.com/docs/tax.html). In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero. \* \`exempt\` - + + * Customer is exempted from tax. When using Chargebee's native [Taxes](https://www.chargebee.com/docs/tax.html) feature or when using the [TaxJar integration](https://www.chargebee.com/docs/taxjar.html), no other action is needed. + * However, when using our [Avalara integration](https://www.chargebee.com/docs/avalara.html), optionally, specify `entity_code` or `exempt_number` attributes if you use Chargebee's [AvaTax for Sales](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) or specify `exemption_details` attribute if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. Tax may still be applied by Avalara for certain values of `entity_code`/`exempt_number`/`exemption_details` based on the state/region/province of the taxable address. + enum: + - taxable + - exempt + is_not: + type: string + description: | + \* \`taxable\` - Computes tax for the customer based on the [site configuration](https://www.chargebee.com/docs/tax.html). In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero. \* \`exempt\` - + + * Customer is exempted from tax. When using Chargebee's native [Taxes](https://www.chargebee.com/docs/tax.html) feature or when using the [TaxJar integration](https://www.chargebee.com/docs/taxjar.html), no other action is needed. + * However, when using our [Avalara integration](https://www.chargebee.com/docs/avalara.html), optionally, specify `entity_code` or `exempt_number` attributes if you use Chargebee's [AvaTax for Sales](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) or specify `exemption_details` attribute if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. Tax may still be applied by Avalara for certain values of `entity_code`/`exempt_number`/`exemption_details` based on the state/region/province of the taxable address. + enum: + - taxable + - exempt + in: + pattern: "^\\[(taxable|exempt)(,(taxable|exempt))*\\]$" + type: string + not_in: + pattern: "^\\[(taxable|exempt)(,(taxable|exempt))*\\]$" + type: string + description: | + Specifies if the customer is liable for tax + example: taxable + deprecated: false + created_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + Timestamp indicating when this customer resource is created. + example: "1435054328" + deprecated: false + updated_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + To filter based on \`updated_at\`. This attribute will be present only if the resource has been updated after 2016-09-28. It is advisable when using this filter, to pass the \`sort_by\` input parameter as \`updated_at\` for a faster response. + example: "1243545465" + deprecated: false + offline_payment_method: + type: object + properties: + is: + type: string + description: | + \* \`no_preference\` - No Preference \* \`cash\` - Cash \* \`check\` - Check \* \`bank_transfer\` - Bank Transfer \* \`ach_credit\` - ACH Credit \* \`sepa_credit\` - SEPA Credit \* \`boleto\` - Boleto \* \`us_automated_bank_transfer\` - US Automated Bank Transfer \* \`eu_automated_bank_transfer\` - EU Automated Bank Transfer \* \`uk_automated_bank_transfer\` - UK Automated Bank Transfer \* \`jp_automated_bank_transfer\` - JP Automated Bank Transfer \* \`mx_automated_bank_transfer\` - MX Automated Bank Transfer \* \`custom\` - Custom + enum: + - no_preference + - cash + - check + - bank_transfer + - ach_credit + - sepa_credit + - boleto + - us_automated_bank_transfer + - eu_automated_bank_transfer + - uk_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + - custom + is_not: + type: string + description: | + \* \`no_preference\` - No Preference \* \`cash\` - Cash \* \`check\` - Check \* \`bank_transfer\` - Bank Transfer \* \`ach_credit\` - ACH Credit \* \`sepa_credit\` - SEPA Credit \* \`boleto\` - Boleto \* \`us_automated_bank_transfer\` - US Automated Bank Transfer \* \`eu_automated_bank_transfer\` - EU Automated Bank Transfer \* \`uk_automated_bank_transfer\` - UK Automated Bank Transfer \* \`jp_automated_bank_transfer\` - JP Automated Bank Transfer \* \`mx_automated_bank_transfer\` - MX Automated Bank Transfer \* \`custom\` - Custom + enum: + - no_preference + - cash + - check + - bank_transfer + - ach_credit + - sepa_credit + - boleto + - us_automated_bank_transfer + - eu_automated_bank_transfer + - uk_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + - custom + in: + pattern: "^\\[(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom)(,(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom)(,(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom))*\\\ + ]$" + type: string + description: | + The preferred offline payment method for the customer. + example: cash + deprecated: false + auto_close_invoices: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Override for this customer, the \[site-level setting\](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing) for auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute is also available at the \[subscription level\](/docs/api/subscriptions?prod_cat_ver=2#subscription_auto_close_invoices) which takes precedence. + example: "true" + deprecated: false + channel: + type: object + properties: + is: + type: string + description: "\\* \\`web\\` - The object was created (and\ + \ is maintained) for the web channel directly in Chargebee\ + \ via API or UI. \\* \\`app_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this\ + \ object via UI or API is disallowed. \\* \\`play_store\\\ + ` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of\ + \ this object via UI or API is disallowed. \n\nIn-App\ + \ Subscriptions is currently in early access. Contact\ + \ [eap@chargebee.com](mailto:eap@chargebee.com) for more\ + \ information.\n" + enum: + - web + - app_store + - play_store + is_not: + type: string + description: "\\* \\`web\\` - The object was created (and\ + \ is maintained) for the web channel directly in Chargebee\ + \ via API or UI. \\* \\`app_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this\ + \ object via UI or API is disallowed. \\* \\`play_store\\\ + ` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of\ + \ this object via UI or API is disallowed. \n\nIn-App\ + \ Subscriptions is currently in early access. Contact\ + \ [eap@chargebee.com](mailto:eap@chargebee.com) for more\ + \ information.\n" + enum: + - web + - app_store + - play_store + in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + description: | + The subscription channel this object originated from and is maintained in. + example: APP STORE + deprecated: false + description: | + Parameters for customer + deprecated: false + relationship: + type: object + properties: + parent_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + description: | + Immediate parent with whom we will link our new customer(child) + example: future_billing + deprecated: false + payment_owner_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + description: | + Parent who is going to pay + example: active1 + deprecated: false + invoice_owner_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + description: | + Parent who is going to handle invoices + example: future_billing + deprecated: false + description: | + Parameters for relationship + deprecated: false + encoding: + customer: + style: deepObject + explode: true + invoice: + style: deepObject + explode: true + relationship: + style: deepObject + explode: true + subscription: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - export + type: object + properties: + export: + $ref: '#/components/schemas/Export' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /exports/revenue_recognition: + post: + summary: Export Revenue Recognition Reports + description: | + **Important:** + + This report is deprecated. Therefore, the endpoint is also deprecated. + + This API triggers export for the revenue recognition report. + + **Note:** This API call is asynchronous. You need to check if this operation has completed by checking if the export status is **completed** . You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. In case you are using any of the client libraries, use the **wait for export completion** function provided as an instance method in the library. You need to check if this operation has completed by checking if the export status is **completed** . You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method **waitForExportCompletion()** on the returned **Export** resource which will wait until the export status changes. You need to check if this operation has completed by checking if the export status is **completed** . You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method **waitForExportCompletion()** on the returned **Export** resource which will wait until the export status changes. You need to check if this operation has completed by checking if the export status is **completed** . You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method **wait_for_export_completion** on the returned **export** resource which will wait until the export status changes. You need to check if this operation has completed by checking if the export status is **completed** . You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method **wait_for_export_completion** on the returned **export** resource which will wait until the export status changes. You need to check if this operation has completed by checking if the export status is **completed** . You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method **WaitForExportCompletion** on the returned **Export** resource which will wait until the export status changes. You need to check if this operation has completed by checking if the export status is **completed** . You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method **wait_for_export_completion** on the returned **export** resource which wait until the export status changes. You need to check if this operation has completed by checking if the export status is **completed** . You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method **wait_for_export_completion** on the returned **export** resource which wait until the export status changes. + operationId: export_revenue_recognition_reports + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[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fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - report_by + - report_from_month + - report_from_year + - report_to_month + - report_to_year + type: object + properties: + report_by: + type: string + description: | + Determines the scope of the report. Returns the report based on the value specified. \* subscription - Subscription \* invoice - Invoice \* product - Product (Includes Plan, Addon and Adhoc) \* customer - Customer + deprecated: false + enum: + - customer + - invoice + - product + - subscription + currency_code: + maxLength: 3 + type: string + description: | + Value must be in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) format. Generates the report based on the value specified. If no currency_code value is specified, then consolidated report based on base currency is returned. + deprecated: false + report_from_month: + type: integer + description: | + Obtains report data from the specified month, combined with the value specified for report_from_year. Values must be between 1 and 12, where 1 is January and 12 is December. + format: int32 + deprecated: false + report_from_year: + type: integer + description: | + Obtains report data from the specified year, combined with the value specified for report_from_month. + format: int32 + deprecated: false + report_to_month: + type: integer + description: | + Obtains report data from the specified month, combined with the value specified for report_to_year. Values must be between 1 and 12, where 1 is January and 12 is December. + format: int32 + deprecated: false + report_to_year: + type: integer + description: | + Obtains report data until the specified year, combined with the value specified for report_to_month. + format: int32 + deprecated: false + include_discounts: + type: boolean + description: | + Returns amount with discount in the report. If value specified is false, it returns amount without discount. + deprecated: false + default: true + payment_owner: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + optional, string filter Payment owner of an invoice. \*\*Supported operators :\*\* is, is_not, starts_with, in, not_in \*\*Example →\*\* \*payment_owner\\\[is\\\] = "payment_customer"\* + example: payment_customer + deprecated: false + item_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + optional, string filter The plan item code. \*\*Supported operators :\*\* is, is_not, starts_with, in, not_in \*\*Example →\*\* \*item_id\\\[is\\\] = "silver"\* + example: silver + deprecated: false + item_price_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + optional, string filter The plan item price code. \*\*Supported operators :\*\* is, is_not, starts_with, in, not_in \*\*Example →\*\* \*item_price_id\\\[is\\\] = "silver-USD-monthly"\* + example: silver-USD-monthly + deprecated: false + cancel_reason_code: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + optional, string filter Reason code for canceling the subscription. Must be one from a list of reason codes set in the Chargebee app in \*\*Settings \\\> Configure Chargebee \\\> Reason Codes \\\> Subscriptions \\\> Subscription Cancellation\*\* . Must be passed if set as mandatory in the app. The codes are case-sensitive. \*\*Supported operators :\*\* is, is_not, starts_with, in, not_in \*\*Example →\*\* \*cancel_reason_code\\\[is\\\] = "Not Paid"\* + example: Not Paid + deprecated: false + business_entity_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + description: | + optional, string filter The unique ID of the \[business entity\](/docs/api?prod_cat_ver=2#mbe) of this subscription. This is always the same as the \[business entity\](/docs/api/subscriptions?prod_cat_ver=2#subscription_customer_id) of the customer. \*\*Supported operators :\*\* is, is_not, starts_with \*\*Example →\*\* \*business_entity_id\\\[is_not\\\] = "business_entity_id"\* + example: business_entity_id + deprecated: false + invoice: + type: object + properties: + id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + The invoice number. Acts as a identifier for invoice and typically generated sequentially. + example: INVOICE_654 + deprecated: false + recurring: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Boolean indicating whether this invoice belongs to a subscription + example: "true" + deprecated: false + status: + type: object + properties: + is: + type: string + description: "\\* \\`paid\\` - Indicates a paid invoice.\ + \ \\* \\`posted\\` - Indicates the payment is not yet\ + \ collected and will be in this state till the due date\ + \ to indicate the due period \\* \\`payment_due\\` - Indicates\ + \ the payment is not yet collected and is being retried\ + \ as per retry settings. \\* \\`not_paid\\` - Indicates\ + \ the payment is not made and all attempts to collect\ + \ is failed. \\* \\`voided\\` - Indicates a voided invoice.\ + \ \\* \\`pending\\` - \nThe [invoice](/docs/api/invoices?prod_cat_ver=2#invoice_status)\ + \ is yet to be closed (sent for payment collection). An\ + \ invoice is generated with this `status` when it has\ + \ line items that belong to items that are `metered` or\ + \ when the `subscription.create_pending_invoices`attribute\ + \ is set to `true`. \nThe [invoice](/docs/api/invoices?prod_cat_ver=1#invoice_status)\ + \ is yet to be closed (sent for payment collection). All\ + \ invoices are generated with this `status` when [Metered\ + \ Billing](https://www.chargebee.com/docs/1.0/metered_billing.html)\ + \ is enabled for the site.\n" + enum: + - paid + - posted + - payment_due + - not_paid + - voided + - pending + is_not: + type: string + description: "\\* \\`paid\\` - Indicates a paid invoice.\ + \ \\* \\`posted\\` - Indicates the payment is not yet\ + \ collected and will be in this state till the due date\ + \ to indicate the due period \\* \\`payment_due\\` - Indicates\ + \ the payment is not yet collected and is being retried\ + \ as per retry settings. \\* \\`not_paid\\` - Indicates\ + \ the payment is not made and all attempts to collect\ + \ is failed. \\* \\`voided\\` - Indicates a voided invoice.\ + \ \\* \\`pending\\` - \nThe [invoice](/docs/api/invoices?prod_cat_ver=2#invoice_status)\ + \ is yet to be closed (sent for payment collection). An\ + \ invoice is generated with this `status` when it has\ + \ line items that belong to items that are `metered` or\ + \ when the `subscription.create_pending_invoices`attribute\ + \ is set to `true`. \nThe [invoice](/docs/api/invoices?prod_cat_ver=1#invoice_status)\ + \ is yet to be closed (sent for payment collection). All\ + \ invoices are generated with this `status` when [Metered\ + \ Billing](https://www.chargebee.com/docs/1.0/metered_billing.html)\ + \ is enabled for the site.\n" + enum: + - paid + - posted + - payment_due + - not_paid + - voided + - pending + in: + pattern: "^\\[(paid|posted|payment_due|not_paid|voided|pending)(,(paid|posted|payment_due|not_paid|voided|pending))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(paid|posted|payment_due|not_paid|voided|pending)(,(paid|posted|payment_due|not_paid|voided|pending))*\\\ + ]$" + type: string + description: | + Current status of this invoice. + example: paid + deprecated: false + price_type: + type: object + properties: + is: + type: string + description: | + \* \`tax_exclusive\` - All amounts in the document are exclusive of tax. \* \`tax_inclusive\` - All amounts in the document are inclusive of tax. + enum: + - tax_exclusive + - tax_inclusive + is_not: + type: string + description: | + \* \`tax_exclusive\` - All amounts in the document are exclusive of tax. \* \`tax_inclusive\` - All amounts in the document are inclusive of tax. + enum: + - tax_exclusive + - tax_inclusive + in: + pattern: "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\\ + ]$" + type: string + description: | + The price type of the invoice. + example: tax_exclusive + deprecated: false + date: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + The document date displayed on the invoice PDF. + example: "1394532759" + deprecated: false + paid_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + Timestamp indicating the date \\\& time this invoice got paid. + example: "1394532759" + deprecated: false + total: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + Invoiced amount displayed in cents; that is, a decimal point is not present between the whole number and the decimal part. For example, $499.99 is displayed as 49999, and so on. + example: "1000" + deprecated: false + amount_paid: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + Payments collected successfully for the invoice. This is the sum of \[linked_payments\[\]\](invoices#invoice_linked_payments)\`.txn_amount\` for all \`linked_payments\[\]\` that have \`txn_status\` as \`success\`. + example: "800" + deprecated: false + amount_adjusted: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + Total adjustments made against this invoice. + example: "100" + deprecated: false + credits_applied: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + Total credits applied against this invoice. + example: "100" + deprecated: false + amount_due: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + The unpaid amount that is due on the invoice. This is calculated as: \[total\](invoices#invoice_total) - \[amount_paid\](invoices#invoice_amount_paid) - sum of \[applied_credits\](invoices#invoice_applied_credits)\`.applied_amount\` - sum of \[adjustment_credit_notes\](invoices#invoice_adjustment_credit_notes)\`.cn_total\` - sum of \[linked_taxes_withheld\](invoices#invoice_linked_taxes_withheld)\`.amount\`. + example: "200" + deprecated: false + dunning_status: + type: object + properties: + is: + type: string + description: | + \* \`in_progress\` - Dunning is still in progress. \* \`exhausted\` - Maximum number of attempts have been made. \* \`stopped\` - Dunning has stopped for this invoice. \* \`success\` - Payment successfully collected during dunning process. + enum: + - in_progress + - exhausted + - stopped + - success + is_not: + type: string + description: | + \* \`in_progress\` - Dunning is still in progress. \* \`exhausted\` - Maximum number of attempts have been made. \* \`stopped\` - Dunning has stopped for this invoice. \* \`success\` - Payment successfully collected during dunning process. + enum: + - in_progress + - exhausted + - stopped + - success + in: + pattern: "^\\[(in_progress|exhausted|stopped|success)(,(in_progress|exhausted|stopped|success))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(in_progress|exhausted|stopped|success)(,(in_progress|exhausted|stopped|success))*\\\ + ]$" + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Current dunning status of the invoice. + example: in_progress + deprecated: false + updated_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + To filter based on \`updated_at\`. This attribute will be present only if the resource has been updated after 2016-09-28. It is advisable when using this filter, to pass the \`sort_by\` input parameter as \`updated_at\` for a faster response. + example: "1243545465" + deprecated: false + channel: + type: object + properties: + is: + type: string + description: "\\* \\`web\\` - The object was created (and\ + \ is maintained) for the web channel directly in Chargebee\ + \ via API or UI. \\* \\`app_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this\ + \ object via UI or API is disallowed. \\* \\`play_store\\\ + ` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of\ + \ this object via UI or API is disallowed. \n\nIn-App\ + \ Subscriptions is currently in early access. Contact\ + \ [eap@chargebee.com](mailto:eap@chargebee.com) for more\ + \ information.\n" + enum: + - web + - app_store + - play_store + is_not: + type: string + description: "\\* \\`web\\` - The object was created (and\ + \ is maintained) for the web channel directly in Chargebee\ + \ via API or UI. \\* \\`app_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this\ + \ object via UI or API is disallowed. \\* \\`play_store\\\ + ` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of\ + \ this object via UI or API is disallowed. \n\nIn-App\ + \ Subscriptions is currently in early access. Contact\ + \ [eap@chargebee.com](mailto:eap@chargebee.com) for more\ + \ information.\n" + enum: + - web + - app_store + - play_store + in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + description: | + The subscription channel this object originated from and is maintained in. + example: APP STORE + deprecated: false + description: | + Parameters for invoice + deprecated: false + subscription: + type: object + properties: + id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + A unique and immutable identifier for the subscription. If not provided, it is autogenerated. + example: 8gsnbYfsMLds + deprecated: false + customer_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + Identifier of the customer with whom this subscription is associated. + example: 8gsnbYfsMLds + deprecated: false + status: + type: object + properties: + is: + type: string + description: | + \* \`future\` - The subscription is scheduled to start at a future date. \* \`in_trial\` - The subscription is in trial. \* \`active\` - The subscription is active and will be charged for automatically based on the items in it. \* \`non_renewing\` - The subscription will be canceled at the end of the current term. \* \`paused\` - The subscription is [paused](https://www.chargebee.com/docs/2.0/pause-subscription.html). The subscription will not renew while in this state. \* \`cancelled\` - The subscription has been canceled and is no longer in service. \* \`transferred\` - The subscription has been transferred to another business entity within the organization. + enum: + - future + - in_trial + - active + - non_renewing + - paused + - cancelled + - transferred + is_not: + type: string + description: | + \* \`future\` - The subscription is scheduled to start at a future date. \* \`in_trial\` - The subscription is in trial. \* \`active\` - The subscription is active and will be charged for automatically based on the items in it. \* \`non_renewing\` - The subscription will be canceled at the end of the current term. \* \`paused\` - The subscription is [paused](https://www.chargebee.com/docs/2.0/pause-subscription.html). The subscription will not renew while in this state. \* \`cancelled\` - The subscription has been canceled and is no longer in service. \* \`transferred\` - The subscription has been transferred to another business entity within the organization. + enum: + - future + - in_trial + - active + - non_renewing + - paused + - cancelled + - transferred + in: + pattern: "^\\[(future|in_trial|active|non_renewing|paused|cancelled|transferred)(,(future|in_trial|active|non_renewing|paused|cancelled|transferred))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(future|in_trial|active|non_renewing|paused|cancelled|transferred)(,(future|in_trial|active|non_renewing|paused|cancelled|transferred))*\\\ + ]$" + type: string + description: | + Current state of the subscription + example: active + deprecated: false + cancel_reason: + type: object + properties: + is: + type: string + description: | + \* \`not_paid\` - Not Paid \* \`no_card\` - No Card \* \`fraud_review_failed\` - Fraud Review Failed \* \`non_compliant_eu_customer\` - Non Compliant EU Customer \* \`tax_calculation_failed\` - Tax Calculation Failed \* \`currency_incompatible_with_gateway\` - Currency incompatible with Gateway \* \`non_compliant_customer\` - Non Compliant Customer + enum: + - not_paid + - no_card + - fraud_review_failed + - non_compliant_eu_customer + - tax_calculation_failed + - currency_incompatible_with_gateway + - non_compliant_customer + is_not: + type: string + description: | + \* \`not_paid\` - Not Paid \* \`no_card\` - No Card \* \`fraud_review_failed\` - Fraud Review Failed \* \`non_compliant_eu_customer\` - Non Compliant EU Customer \* \`tax_calculation_failed\` - Tax Calculation Failed \* \`currency_incompatible_with_gateway\` - Currency incompatible with Gateway \* \`non_compliant_customer\` - Non Compliant Customer + enum: + - not_paid + - no_card + - fraud_review_failed + - non_compliant_eu_customer + - tax_calculation_failed + - currency_incompatible_with_gateway + - non_compliant_customer + in: + pattern: "^\\[(not_paid|no_card|fraud_review_failed|non_compliant_eu_customer|tax_calculation_failed|currency_incompatible_with_gateway|non_compliant_customer)(,(not_paid|no_card|fraud_review_failed|non_compliant_eu_customer|tax_calculation_failed|currency_incompatible_with_gateway|non_compliant_customer))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(not_paid|no_card|fraud_review_failed|non_compliant_eu_customer|tax_calculation_failed|currency_incompatible_with_gateway|non_compliant_customer)(,(not_paid|no_card|fraud_review_failed|non_compliant_eu_customer|tax_calculation_failed|currency_incompatible_with_gateway|non_compliant_customer))*\\\ + ]$" + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + The reason for canceling the subscription. Set by Chargebee automatically. + example: not_paid + deprecated: false + remaining_billing_cycles: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + \* When the subscription is not on a contract term: this value is the number of billing cycles remaining after the current cycle, at the end of which, the subscription cancels. \* When the subscription is on a \[contract term\](contract_terms): this value is the number of billing cycles remaining in the contract term after the current billing cycle. + example: "3" + deprecated: false + created_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + The time at which the subscription was created. + example: "1435054328" + deprecated: false + activated_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Time at which the subscription \`status\` last changed to \`active\`. For example, this value is updated when an \`in_trial\` or \`cancelled\` subscription activates. + example: "1435054328" + deprecated: false + next_billing_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + The date/time at which the next billing for the subscription happens. This is usually right after \`current_term_end\` unless multiple subscription terms were invoiced in advance using the \`terms_to_charge\` parameter. + example: "1435054328" + deprecated: false + cancelled_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + Time at which subscription was cancelled or is set to be cancelled. + example: "1435054328" + deprecated: false + has_scheduled_changes: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + If \`true\`, there are subscription changes scheduled on next renewal. + example: "true" + deprecated: false + updated_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + To filter based on \`updated_at\`. This attribute will be present only if the resource has been updated after 2016-09-28. It is advisable when using this filter, to pass the \`sort_by\` input parameter as \`updated_at\` for a faster response. + example: "1243545465" + deprecated: false + offline_payment_method: + type: object + properties: + is: + type: string + description: | + \* \`no_preference\` - No Preference \* \`cash\` - Cash \* \`check\` - Check \* \`bank_transfer\` - Bank Transfer \* \`ach_credit\` - ACH Credit \* \`sepa_credit\` - SEPA Credit \* \`boleto\` - Boleto \* \`us_automated_bank_transfer\` - US Automated Bank Transfer \* \`eu_automated_bank_transfer\` - EU Automated Bank Transfer \* \`uk_automated_bank_transfer\` - UK Automated Bank Transfer \* \`jp_automated_bank_transfer\` - JP Automated Bank Transfer \* \`mx_automated_bank_transfer\` - MX Automated Bank Transfer \* \`custom\` - Custom + enum: + - no_preference + - cash + - check + - bank_transfer + - ach_credit + - sepa_credit + - boleto + - us_automated_bank_transfer + - eu_automated_bank_transfer + - uk_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + - custom + is_not: + type: string + description: | + \* \`no_preference\` - No Preference \* \`cash\` - Cash \* \`check\` - Check \* \`bank_transfer\` - Bank Transfer \* \`ach_credit\` - ACH Credit \* \`sepa_credit\` - SEPA Credit \* \`boleto\` - Boleto \* \`us_automated_bank_transfer\` - US Automated Bank Transfer \* \`eu_automated_bank_transfer\` - EU Automated Bank Transfer \* \`uk_automated_bank_transfer\` - UK Automated Bank Transfer \* \`jp_automated_bank_transfer\` - JP Automated Bank Transfer \* \`mx_automated_bank_transfer\` - MX Automated Bank Transfer \* \`custom\` - Custom + enum: + - no_preference + - cash + - check + - bank_transfer + - ach_credit + - sepa_credit + - boleto + - us_automated_bank_transfer + - eu_automated_bank_transfer + - uk_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + - custom + in: + pattern: "^\\[(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom)(,(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom)(,(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom))*\\\ + ]$" + type: string + description: | + The preferred offline payment method for the subscription. + example: cash + deprecated: false + auto_close_invoices: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Set to \`false\` to override for this subscription, the \[site-level setting\](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing) for auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute has a higher precedence than the same attribute at the \[customer level\](/docs/api/customers?prod_cat_ver=2#customer_auto_close_invoices). + example: "true" + deprecated: false + channel: + type: object + properties: + is: + type: string + description: "\\* \\`web\\` - The object was created (and\ + \ is maintained) for the web channel directly in Chargebee\ + \ via API or UI. \\* \\`app_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this\ + \ object via UI or API is disallowed. \\* \\`play_store\\\ + ` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of\ + \ this object via UI or API is disallowed. \n\nIn-App\ + \ Subscriptions is currently in early access. Contact\ + \ [eap@chargebee.com](mailto:eap@chargebee.com) for more\ + \ information.\n" + enum: + - web + - app_store + - play_store + is_not: + type: string + description: "\\* \\`web\\` - The object was created (and\ + \ is maintained) for the web channel directly in Chargebee\ + \ via API or UI. \\* \\`app_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this\ + \ object via UI or API is disallowed. \\* \\`play_store\\\ + ` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of\ + \ this object via UI or API is disallowed. \n\nIn-App\ + \ Subscriptions is currently in early access. Contact\ + \ [eap@chargebee.com](mailto:eap@chargebee.com) for more\ + \ information.\n" + enum: + - web + - app_store + - play_store + in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + description: | + The subscription channel this object originated from and is maintained in. + example: APP STORE + deprecated: false + description: | + Parameters for subscription + deprecated: false + customer: + type: object + properties: + id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + Identifier of the customer. + example: 9bsvnHgsvmsI + deprecated: false + first_name: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + First name of the customer + example: John + deprecated: false + last_name: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Last name of the customer + example: Clint + deprecated: false + email: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Email of the customer. Configured email notifications will be sent to this email. + example: john@test.com + deprecated: false + company: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Company name of the customer. + example: Globex Corp + deprecated: false + phone: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Phone number of the customer + example: (541) 754-3010 + deprecated: false + auto_collection: + type: object + properties: + is: + type: string + description: | + \* \`on\` - Whenever an invoice is created, an automatic attempt to charge the customer's payment method is made. \* \`off\` - Automatic collection of charges will not be made. All payments must be recorded offline. + enum: + - "on" + - "off" + is_not: + type: string + description: | + \* \`on\` - Whenever an invoice is created, an automatic attempt to charge the customer's payment method is made. \* \`off\` - Automatic collection of charges will not be made. All payments must be recorded offline. + enum: + - "on" + - "off" + in: + pattern: "^\\[(on|off)(,(on|off))*\\]$" + type: string + not_in: + pattern: "^\\[(on|off)(,(on|off))*\\]$" + type: string + description: | + Whether payments needs to be collected automatically for this customer + example: "on" + deprecated: false + taxability: + type: object + properties: + is: + type: string + description: | + \* \`taxable\` - Computes tax for the customer based on the [site configuration](https://www.chargebee.com/docs/tax.html). In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero. \* \`exempt\` - + + * Customer is exempted from tax. When using Chargebee's native [Taxes](https://www.chargebee.com/docs/tax.html) feature or when using the [TaxJar integration](https://www.chargebee.com/docs/taxjar.html), no other action is needed. + * However, when using our [Avalara integration](https://www.chargebee.com/docs/avalara.html), optionally, specify `entity_code` or `exempt_number` attributes if you use Chargebee's [AvaTax for Sales](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) or specify `exemption_details` attribute if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. Tax may still be applied by Avalara for certain values of `entity_code`/`exempt_number`/`exemption_details` based on the state/region/province of the taxable address. + enum: + - taxable + - exempt + is_not: + type: string + description: | + \* \`taxable\` - Computes tax for the customer based on the [site configuration](https://www.chargebee.com/docs/tax.html). In some cases, depending on the region, shipping_address is needed. If not provided, then billing_address is used to compute tax. If that's not available either, the tax is taken as zero. \* \`exempt\` - + + * Customer is exempted from tax. When using Chargebee's native [Taxes](https://www.chargebee.com/docs/tax.html) feature or when using the [TaxJar integration](https://www.chargebee.com/docs/taxjar.html), no other action is needed. + * However, when using our [Avalara integration](https://www.chargebee.com/docs/avalara.html), optionally, specify `entity_code` or `exempt_number` attributes if you use Chargebee's [AvaTax for Sales](https://www.chargebee.com/docs/avalara.html#configuring-tax-exemption) or specify `exemption_details` attribute if you use [Chargebee's AvaTax for Communications](https://www.chargebee.com/docs/avatax-for-communication.html) integration. Tax may still be applied by Avalara for certain values of `entity_code`/`exempt_number`/`exemption_details` based on the state/region/province of the taxable address. + enum: + - taxable + - exempt + in: + pattern: "^\\[(taxable|exempt)(,(taxable|exempt))*\\]$" + type: string + not_in: + pattern: "^\\[(taxable|exempt)(,(taxable|exempt))*\\]$" + type: string + description: | + Specifies if the customer is liable for tax + example: taxable + deprecated: false + created_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + Timestamp indicating when this customer resource is created. + example: "1435054328" + deprecated: false + updated_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + To filter based on \`updated_at\`. This attribute will be present only if the resource has been updated after 2016-09-28. It is advisable when using this filter, to pass the \`sort_by\` input parameter as \`updated_at\` for a faster response. + example: "1243545465" + deprecated: false + offline_payment_method: + type: object + properties: + is: + type: string + description: | + \* \`no_preference\` - No Preference \* \`cash\` - Cash \* \`check\` - Check \* \`bank_transfer\` - Bank Transfer \* \`ach_credit\` - ACH Credit \* \`sepa_credit\` - SEPA Credit \* \`boleto\` - Boleto \* \`us_automated_bank_transfer\` - US Automated Bank Transfer \* \`eu_automated_bank_transfer\` - EU Automated Bank Transfer \* \`uk_automated_bank_transfer\` - UK Automated Bank Transfer \* \`jp_automated_bank_transfer\` - JP Automated Bank Transfer \* \`mx_automated_bank_transfer\` - MX Automated Bank Transfer \* \`custom\` - Custom + enum: + - no_preference + - cash + - check + - bank_transfer + - ach_credit + - sepa_credit + - boleto + - us_automated_bank_transfer + - eu_automated_bank_transfer + - uk_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + - custom + is_not: + type: string + description: | + \* \`no_preference\` - No Preference \* \`cash\` - Cash \* \`check\` - Check \* \`bank_transfer\` - Bank Transfer \* \`ach_credit\` - ACH Credit \* \`sepa_credit\` - SEPA Credit \* \`boleto\` - Boleto \* \`us_automated_bank_transfer\` - US Automated Bank Transfer \* \`eu_automated_bank_transfer\` - EU Automated Bank Transfer \* \`uk_automated_bank_transfer\` - UK Automated Bank Transfer \* \`jp_automated_bank_transfer\` - JP Automated Bank Transfer \* \`mx_automated_bank_transfer\` - MX Automated Bank Transfer \* \`custom\` - Custom + enum: + - no_preference + - cash + - check + - bank_transfer + - ach_credit + - sepa_credit + - boleto + - us_automated_bank_transfer + - eu_automated_bank_transfer + - uk_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + - custom + in: + pattern: "^\\[(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom)(,(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom)(,(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom))*\\\ + ]$" + type: string + description: | + The preferred offline payment method for the customer. + example: cash + deprecated: false + auto_close_invoices: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Override for this customer, the \[site-level setting\](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing) for auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute is also available at the \[subscription level\](/docs/api/subscriptions?prod_cat_ver=2#subscription_auto_close_invoices) which takes precedence. + example: "true" + deprecated: false + channel: + type: object + properties: + is: + type: string + description: "\\* \\`web\\` - The object was created (and\ + \ is maintained) for the web channel directly in Chargebee\ + \ via API or UI. \\* \\`app_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this\ + \ object via UI or API is disallowed. \\* \\`play_store\\\ + ` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of\ + \ this object via UI or API is disallowed. \n\nIn-App\ + \ Subscriptions is currently in early access. Contact\ + \ [eap@chargebee.com](mailto:eap@chargebee.com) for more\ + \ information.\n" + enum: + - web + - app_store + - play_store + is_not: + type: string + description: "\\* \\`web\\` - The object was created (and\ + \ is maintained) for the web channel directly in Chargebee\ + \ via API or UI. \\* \\`app_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this\ + \ object via UI or API is disallowed. \\* \\`play_store\\\ + ` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of\ + \ this object via UI or API is disallowed. \n\nIn-App\ + \ Subscriptions is currently in early access. Contact\ + \ [eap@chargebee.com](mailto:eap@chargebee.com) for more\ + \ information.\n" + enum: + - web + - app_store + - play_store + in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + description: | + The subscription channel this object originated from and is maintained in. + example: APP STORE + deprecated: false + description: | + Parameters for customer + deprecated: false + relationship: + type: object + properties: + parent_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + description: | + Immediate parent with whom we will link our new customer(child) + example: future_billing + deprecated: false + payment_owner_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + description: | + Parent who is going to pay + example: active1 + deprecated: false + invoice_owner_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + description: | + Parent who is going to handle invoices + example: future_billing + deprecated: false + description: | + Parameters for relationship + deprecated: false + encoding: + customer: + style: deepObject + explode: true + invoice: + style: deepObject + explode: true + relationship: + style: deepObject + explode: true + subscription: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - export + type: object + properties: + export: + $ref: '#/components/schemas/Export' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /exports/credit_notes: + post: + summary: Export Credit Notes + description: | + This API triggers export of credit note data. The exported zip file contains CSV files with credit note-related data. + operationId: export_credit_notes + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?: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a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + credit_note: + type: object + properties: + id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + Credit-note id. + example: CN_123 + deprecated: false + customer_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + The identifier of the customer this Credit Note belongs to. + example: 4gmiXbsjdm + deprecated: false + subscription_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + To filter based on subscription_id. NOTE: Not to be used if \*consolidated invoicing\* feature is enabled. + example: 4gmiXbsjdm + deprecated: false + reference_invoice_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + The identifier of the invoice against which this Credit Note is issued + example: INVOICE_876 + deprecated: false + type: + type: object + properties: + is: + type: string + description: | + \* \`adjustment\` - Adjustment Credit Note \* \`refundable\` - Refundable Credit Note + enum: + - adjustment + - refundable + is_not: + type: string + description: | + \* \`adjustment\` - Adjustment Credit Note \* \`refundable\` - Refundable Credit Note + enum: + - adjustment + - refundable + in: + pattern: "^\\[(adjustment|refundable)(,(adjustment|refundable))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(adjustment|refundable)(,(adjustment|refundable))*\\\ + ]$" + type: string + description: | + The credit note type. + example: adjustment + deprecated: false + reason_code: + type: object + properties: + is: + type: string + description: | + \* \`write_off\` - This reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off) operation. \* \`subscription_change\` - This reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html) is enabled \* \`subscription_cancellation\` - This reason will be set automatically for Credit Notes created during cancel subscription operation \* \`subscription_pause\` - This reason will be automatically set to credit notes created during pause/resume subscription operation. \* \`chargeback\` - Can be set when you are recording your customer Chargebacks \* \`product_unsatisfactory\` - Product Unsatisfactory \* \`service_unsatisfactory\` - Service Unsatisfactory \* \`order_change\` - Order Change \* \`order_cancellation\` - Order Cancellation \* \`waiver\` - Waiver \* \`other\` - Can be set when none of the above reason codes are applicable \* \`fraudulent\` - FRAUDULENT + enum: + - write_off + - subscription_change + - subscription_cancellation + - subscription_pause + - chargeback + - product_unsatisfactory + - service_unsatisfactory + - order_change + - order_cancellation + - waiver + - other + - fraudulent + is_not: + type: string + description: | + \* \`write_off\` - This reason will be set automatically for the Credit Notes created during invoice [Write Off](https://www.chargebee.com/docs/invoice-operations.html#write-off) operation. \* \`subscription_change\` - This reason will be set automatically for Credit Notes created during Change Subscription operation when [proration](https://www.chargebee.com/docs/proration.html) is enabled \* \`subscription_cancellation\` - This reason will be set automatically for Credit Notes created during cancel subscription operation \* \`subscription_pause\` - This reason will be automatically set to credit notes created during pause/resume subscription operation. \* \`chargeback\` - Can be set when you are recording your customer Chargebacks \* \`product_unsatisfactory\` - Product Unsatisfactory \* \`service_unsatisfactory\` - Service Unsatisfactory \* \`order_change\` - Order Change \* \`order_cancellation\` - Order Cancellation \* \`waiver\` - Waiver \* \`other\` - Can be set when none of the above reason codes are applicable \* \`fraudulent\` - FRAUDULENT + enum: + - write_off + - subscription_change + - subscription_cancellation + - subscription_pause + - chargeback + - product_unsatisfactory + - service_unsatisfactory + - order_change + - order_cancellation + - waiver + - other + - fraudulent + in: + pattern: "^\\[(write_off|subscription_change|subscription_cancellation|subscription_pause|chargeback|product_unsatisfactory|service_unsatisfactory|order_change|order_cancellation|waiver|other|fraudulent)(,(write_off|subscription_change|subscription_cancellation|subscription_pause|chargeback|product_unsatisfactory|service_unsatisfactory|order_change|order_cancellation|waiver|other|fraudulent))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(write_off|subscription_change|subscription_cancellation|subscription_pause|chargeback|product_unsatisfactory|service_unsatisfactory|order_change|order_cancellation|waiver|other|fraudulent)(,(write_off|subscription_change|subscription_cancellation|subscription_pause|chargeback|product_unsatisfactory|service_unsatisfactory|order_change|order_cancellation|waiver|other|fraudulent))*\\\ + ]$" + type: string + description: | + The reason for issuing this Credit Note. The following reason codes are supported now\\\[Deprecated; use the \[create_reason_code\](/docs/api/credit_notes#credit_note_create_reason_code) parameter instead\\\] + example: waiver + deprecated: false + create_reason_code: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + Reason code for creating the credit note. Must be one from a list of reason codes set in the Chargebee app in \*\*Settings \\\> Configure Chargebee \\\> Reason Codes \\\> Credit Notes \\\> Create Credit Note\*\*. Must be passed if set as mandatory in the app. The codes are case-sensitive + example: Other + deprecated: false + status: + type: object + properties: + is: + type: string + description: | + \* \`adjusted\` - When the Credit Note has been adjusted against an invoice. \* \`refunded\` - When the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded). \* \`refund_due\` - When the credits are yet to be used, or have been partially used. \* \`voided\` - When the Credit Note has been cancelled. + enum: + - adjusted + - refunded + - refund_due + - voided + is_not: + type: string + description: | + \* \`adjusted\` - When the Credit Note has been adjusted against an invoice. \* \`refunded\` - When the entire credits (Credit Note amount) have been used (i.e either allocated to invoices or refunded). \* \`refund_due\` - When the credits are yet to be used, or have been partially used. \* \`voided\` - When the Credit Note has been cancelled. + enum: + - adjusted + - refunded + - refund_due + - voided + in: + pattern: "^\\[(adjusted|refunded|refund_due|voided)(,(adjusted|refunded|refund_due|voided))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(adjusted|refunded|refund_due|voided)(,(adjusted|refunded|refund_due|voided))*\\\ + ]$" + type: string + description: | + The credit note status. + example: adjusted + deprecated: false + date: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + The date the Credit Note is issued. + example: "1435054328" + deprecated: false + total: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + Credit Note amount in cents. + example: "1200" + deprecated: false + price_type: + type: object + properties: + is: + type: string + description: | + \* \`tax_exclusive\` - All amounts in the document are exclusive of tax. \* \`tax_inclusive\` - All amounts in the document are inclusive of tax. + enum: + - tax_exclusive + - tax_inclusive + is_not: + type: string + description: | + \* \`tax_exclusive\` - All amounts in the document are exclusive of tax. \* \`tax_inclusive\` - All amounts in the document are inclusive of tax. + enum: + - tax_exclusive + - tax_inclusive + in: + pattern: "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\\ + ]$" + type: string + description: | + The price type of the Credit Note. + example: tax_exclusive + deprecated: false + amount_allocated: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + The amount allocated to the invoices. + example: "1200" + deprecated: false + amount_refunded: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + The refunds issued from this Credit Note. + example: "130" + deprecated: false + amount_available: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + The yet to be used credits of this Credit Note. + example: "1400" + deprecated: false + voided_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + Timestamp indicating the date and time this Credit Note gets voided. + example: "1435054328" + deprecated: false + updated_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + To filter based on updated at. This attribute will be present only if the resource has been updated after 2016-09-28. + example: "1243545465" + deprecated: false + channel: + type: object + properties: + is: + type: string + description: "\\* \\`web\\` - The object was created (and\ + \ is maintained) for the web channel directly in Chargebee\ + \ via API or UI. \\* \\`app_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this\ + \ object via UI or API is disallowed. \\* \\`play_store\\\ + ` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of\ + \ this object via UI or API is disallowed. \n\nIn-App\ + \ Subscriptions is currently in early access. Contact\ + \ [eap@chargebee.com](mailto:eap@chargebee.com) for more\ + \ information.\n" + enum: + - web + - app_store + - play_store + is_not: + type: string + description: "\\* \\`web\\` - The object was created (and\ + \ is maintained) for the web channel directly in Chargebee\ + \ via API or UI. \\* \\`app_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this\ + \ object via UI or API is disallowed. \\* \\`play_store\\\ + ` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of\ + \ this object via UI or API is disallowed. \n\nIn-App\ + \ Subscriptions is currently in early access. Contact\ + \ [eap@chargebee.com](mailto:eap@chargebee.com) for more\ + \ information.\n" + enum: + - web + - app_store + - play_store + in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + description: | + The subscription channel this object originated from and is maintained in. + example: APP STORE + deprecated: false + description: | + Parameters for credit_note + deprecated: false + encoding: + credit_note: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - export + type: object + properties: + export: + $ref: '#/components/schemas/Export' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /exports/coupons: + post: + summary: Export Coupons + description: | + This API triggers export of coupon data. The exported zip file contains CSV files with coupon-related data. + operationId: export_coupons + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})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?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + currency_code: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + optional, string filter The currency code (\[ISO 4217 format\](https://www.chargebee.com/docs/supported-currencies.html)) of the coupon. Applicable for \*fixed_amount\* coupons alone. \*\*Supported operators :\*\* is, is_not, starts_with, in, not_in \*\*Example →\*\* \*currency_code\\\[is\\\] = "USD"\* + example: USD + deprecated: false + coupon: + type: object + properties: + id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + Used to uniquely identify the coupon in your website/application and to integrate with Chargebee. \*\*Note:\*\* When the coupon ID contains a special character; for example: \`#\`, the API returns an error. Make sure that you \[encode\](https://www.urlencoder.org/) the coupon ID in the path parameter before making an API call. + example: OFF2008 + deprecated: false + name: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + The display name used in web interface for identifying the coupon. \*\*Note:\*\* When the name of the coupon set contains a special character; for example: \`#\`, the API returns an error. Make sure that you \[encode\](https://www.urlencoder.org/) the name of the coupon set in the path parameter before making an API call. + example: Offer 10 + deprecated: false + discount_type: + type: object + properties: + is: + type: string + description: | + \* \`fixed_amount\` - The specified amount will be deducted. \* \`percentage\` - The specified percentage will be deducted. \* \`offer_quantity\` - \*\*(Deprecated)\*\* The specified units will be offered for free. + enum: + - fixed_amount + - percentage + is_not: + type: string + description: | + \* \`fixed_amount\` - The specified amount will be deducted. \* \`percentage\` - The specified percentage will be deducted. \* \`offer_quantity\` - \*\*(Deprecated)\*\* The specified units will be offered for free. + enum: + - fixed_amount + - percentage + in: + pattern: "^\\[(fixed_amount|percentage|offer_quantity)(,(fixed_amount|percentage|offer_quantity))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(fixed_amount|percentage|offer_quantity)(,(fixed_amount|percentage|offer_quantity))*\\\ + ]$" + type: string + description: | + The type of deduction + example: fixed_amount + deprecated: false + duration_type: + type: object + properties: + is: + type: string + description: | + \* \`one_time\` - The coupon stays attached to the subscription till it is applied on an invoice **once** . It is removed after that from the subscription. \* \`forever\` - The coupon is attached to the subscription and applied on the invoices until explicitly removed. \* \`limited_period\` - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period` and `period_unit`. + enum: + - one_time + - forever + - limited_period + is_not: + type: string + description: | + \* \`one_time\` - The coupon stays attached to the subscription till it is applied on an invoice **once** . It is removed after that from the subscription. \* \`forever\` - The coupon is attached to the subscription and applied on the invoices until explicitly removed. \* \`limited_period\` - The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period` and `period_unit`. + enum: + - one_time + - forever + - limited_period + in: + pattern: "^\\[(one_time|forever|limited_period)(,(one_time|forever|limited_period))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(one_time|forever|limited_period)(,(one_time|forever|limited_period))*\\\ + ]$" + type: string + description: | + Specifies the time duration for which this coupon is attached to the subscription. + example: forever + deprecated: false + status: + type: object + properties: + is: + type: string + description: | + \* \`active\` - Can be applied to a subscription. \* \`expired\` - Cannot be applied to a subscription. A coupon may expire due to exceeding [max_redemptions](/docs/api/coupons?#coupon_max_redemptions) or [valid_till](/docs/api/coupons?#coupon_valid_till) date is past. Existing associations remain unaffected. \* \`archived\` - Cannot be applied to a subscription. Existing associations remain unaffected. \* \`deleted\` - Indicates the coupon has been deleted. + enum: + - active + - expired + - archived + - deleted + is_not: + type: string + description: | + \* \`active\` - Can be applied to a subscription. \* \`expired\` - Cannot be applied to a subscription. A coupon may expire due to exceeding [max_redemptions](/docs/api/coupons?#coupon_max_redemptions) or [valid_till](/docs/api/coupons?#coupon_valid_till) date is past. Existing associations remain unaffected. \* \`archived\` - Cannot be applied to a subscription. Existing associations remain unaffected. \* \`deleted\` - Indicates the coupon has been deleted. + enum: + - active + - expired + - archived + - deleted + in: + pattern: "^\\[(active|expired|archived|deleted)(,(active|expired|archived|deleted))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(active|expired|archived|deleted)(,(active|expired|archived|deleted))*\\\ + ]$" + type: string + description: | + Status of the coupon. + example: active + deprecated: false + apply_on: + type: object + properties: + is: + type: string + description: "\\* \\`invoice_amount\\` - The coupon is applied\ + \ to the invoice `sub_total`. \\* \\`specified_items_total\\\ + ` - \\*\\*(Deprecated)\\*\\* Discount will be applied\ + \ to the total of plan and addon items specified. \\*\ + \ \\`each_specified_item\\` - \nThe coupon is applied\ + \ to the `invoice.line_item.amount` that corresponds to\ + \ the item price specified by `item_price_id`. \nThe\ + \ coupon is applied to the `invoice.line_item.amount`\ + \ that corresponds to the plan or addon specified by `plan_ids`\ + \ and `addon_ids`. \\* \\`each_unit_of_specified_items\\\ + ` - \\*\\*(Deprecated)\\*\\* Discount will be applied\ + \ to each unit of plan and addon items specified.\n" + enum: + - invoice_amount + - each_specified_item + is_not: + type: string + description: "\\* \\`invoice_amount\\` - The coupon is applied\ + \ to the invoice `sub_total`. \\* \\`specified_items_total\\\ + ` - \\*\\*(Deprecated)\\*\\* Discount will be applied\ + \ to the total of plan and addon items specified. \\*\ + \ \\`each_specified_item\\` - \nThe coupon is applied\ + \ to the `invoice.line_item.amount` that corresponds to\ + \ the item price specified by `item_price_id`. \nThe\ + \ coupon is applied to the `invoice.line_item.amount`\ + \ that corresponds to the plan or addon specified by `plan_ids`\ + \ and `addon_ids`. \\* \\`each_unit_of_specified_items\\\ + ` - \\*\\*(Deprecated)\\*\\* Discount will be applied\ + \ to each unit of plan and addon items specified.\n" + enum: + - invoice_amount + - each_specified_item + in: + pattern: "^\\[(invoice_amount|specified_items_total|each_specified_item|each_unit_of_specified_items)(,(invoice_amount|specified_items_total|each_specified_item|each_unit_of_specified_items))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(invoice_amount|specified_items_total|each_specified_item|each_unit_of_specified_items)(,(invoice_amount|specified_items_total|each_specified_item|each_unit_of_specified_items))*\\\ + ]$" + type: string + description: | + The amount on the invoice to which the coupon is applied. + example: invoice_amount + deprecated: false + created_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + Timestamp indicating when this coupon is created. + example: "145222875" + deprecated: false + updated_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + To filter based on updated at. This attribute will be present only if the resource has been updated after 2016-11-09. + example: "1243545465" + deprecated: false + description: | + Parameters for coupon + deprecated: false + encoding: + coupon: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - export + type: object + properties: + export: + $ref: '#/components/schemas/Export' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /exports/orders: + post: + summary: Export Orders + description: | + This API triggers export of order data. The exported zip file contains CSV files with order-related data. + operationId: export_orders + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{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:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + total: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + optional, in cents filter Total amount charged for the order. \*\*Supported operators :\*\* is, is_not, lt, lte, gt, gte, between \*\*Example →\*\* \*total\\\[is\\\] = "1394532759"\* + example: "1394532759" + deprecated: false + order: + type: object + properties: + id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + Uniquely identifies the order. It is the api identifier for the order + example: "3" + deprecated: false + subscription_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + To filter based on subscription_id. + example: 3bdjnDnsdQn + deprecated: false + customer_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + The customer for which the order is created + example: 3bdjnDnsdQn + deprecated: false + status: + type: object + properties: + is: + type: string + description: | + \* \`new\` - Order has been created. Applicable only if you are using Chargebee's legacy order management system. \* \`processing\` - Order is being processed. Applicable only if you are using Chargebee's legacy order management system \* \`complete\` - Order has been processed successfully. Applicable only if you are using Chargebee's legacy order management system \* \`cancelled\` - Order has been cancelled. Applicable only if you are using Chargebee's legacy order management system \* \`voided\` - Order has been voided. Applicable only if you are using Chargebee's legacy order management system \* \`queued\` - Order is yet to be processed by any system, these are scheduled orders created by Chargebee \* \`awaiting_shipment\` - The order has been picked up by an integration system, and synced to a shipping management platform \* \`on_hold\` - The order is paused from being processed. \* \`delivered\` - The order has been delivered to the customer. \* \`shipped\` - The order has moved from order management system to a shipping system. \* \`partially_delivered\` - The order has been partially delivered to the customer. \* \`returned\` - The order has been returned after delivery. + enum: + - new + - processing + - complete + - cancelled + - voided + - queued + - awaiting_shipment + - on_hold + - delivered + - shipped + - partially_delivered + - returned + is_not: + type: string + description: | + \* \`new\` - Order has been created. Applicable only if you are using Chargebee's legacy order management system. \* \`processing\` - Order is being processed. Applicable only if you are using Chargebee's legacy order management system \* \`complete\` - Order has been processed successfully. Applicable only if you are using Chargebee's legacy order management system \* \`cancelled\` - Order has been cancelled. Applicable only if you are using Chargebee's legacy order management system \* \`voided\` - Order has been voided. Applicable only if you are using Chargebee's legacy order management system \* \`queued\` - Order is yet to be processed by any system, these are scheduled orders created by Chargebee \* \`awaiting_shipment\` - The order has been picked up by an integration system, and synced to a shipping management platform \* \`on_hold\` - The order is paused from being processed. \* \`delivered\` - The order has been delivered to the customer. \* \`shipped\` - The order has moved from order management system to a shipping system. \* \`partially_delivered\` - The order has been partially delivered to the customer. \* \`returned\` - The order has been returned after delivery. + enum: + - new + - processing + - complete + - cancelled + - voided + - queued + - awaiting_shipment + - on_hold + - delivered + - shipped + - partially_delivered + - returned + in: + pattern: "^\\[(new|processing|complete|cancelled|voided|queued|awaiting_shipment|on_hold|delivered|shipped|partially_delivered|returned)(,(new|processing|complete|cancelled|voided|queued|awaiting_shipment|on_hold|delivered|shipped|partially_delivered|returned))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(new|processing|complete|cancelled|voided|queued|awaiting_shipment|on_hold|delivered|shipped|partially_delivered|returned)(,(new|processing|complete|cancelled|voided|queued|awaiting_shipment|on_hold|delivered|shipped|partially_delivered|returned))*\\\ + ]$" + type: string + description: | + The status of this order. + example: paid + deprecated: false + price_type: + type: object + properties: + is: + type: string + description: | + \* \`tax_exclusive\` - All amounts in the document are exclusive of tax. \* \`tax_inclusive\` - All amounts in the document are inclusive of tax. + enum: + - tax_exclusive + - tax_inclusive + is_not: + type: string + description: | + \* \`tax_exclusive\` - All amounts in the document are exclusive of tax. \* \`tax_inclusive\` - All amounts in the document are inclusive of tax. + enum: + - tax_exclusive + - tax_inclusive + in: + pattern: "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(tax_exclusive|tax_inclusive)(,(tax_exclusive|tax_inclusive))*\\\ + ]$" + type: string + description: | + The price type of the order + example: tax_exclusive + deprecated: false + order_date: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + The date on which the order will start getting processed. + example: "1394532759" + deprecated: false + shipping_date: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + This is the date on which the order will be delivered to the customer. + example: "1394532759" + deprecated: false + shipped_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + The time at which the order was shipped. + example: "1394532759" + deprecated: false + delivered_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + The time at which the order was delivered + example: "1394532759" + deprecated: false + cancelled_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + The time at which the order was cancelled. + example: "1394532759" + deprecated: false + amount_paid: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + Total amount paid for the order. + example: "1000" + deprecated: false + refundable_credits: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + The total amount that can be issued as credits for this order. + example: "1000" + deprecated: false + refundable_credits_issued: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + The total amount issued as credits on behalf of this order. + example: "1000" + deprecated: false + updated_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + Filter based on the time at which order has been updated. + example: "1243545465" + deprecated: false + resent_status: + type: object + properties: + is: + type: string + description: | + \* \`fully_resent\` - Order is Fully resent \* \`partially_resent\` - Order is Partially resent + enum: + - fully_resent + - partially_resent + is_not: + type: string + description: | + \* \`fully_resent\` - Order is Fully resent \* \`partially_resent\` - Order is Partially resent + enum: + - fully_resent + - partially_resent + in: + pattern: "^\\[(fully_resent|partially_resent)(,(fully_resent|partially_resent))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(fully_resent|partially_resent)(,(fully_resent|partially_resent))*\\\ + ]$" + type: string + description: | + Resent order status. + example: fully_resent + deprecated: false + is_resent: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Order is resent order or not. + example: "false" + deprecated: false + original_order_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + description: | + If resent order what is the parent order id. + example: "1243545465" + deprecated: false + description: | + Parameters for order + deprecated: false + encoding: + order: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - export + type: object + properties: + export: + $ref: '#/components/schemas/Export' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /exports/item_prices: + post: + summary: Export Item Prices + description: | + This API triggers export of item price data. The exported zip file contains CSV files with item price-related data. + operationId: export_item_prices + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .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])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + item_family_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + optional, string filter Filter item prices based on \`item_family_id\`. \*\*Supported operators :\*\* is, is_not, starts_with, in, not_in \*\*Example →\*\* \*item_family_id\\\[is\\\] = "Acme"\* + example: Acme + deprecated: false + item_type: + type: object + properties: + is: + type: string + description: | + \* \`plan\` - An essential component of a subscription. Every subscription has exactly one plan. It has a recurring charge and its period defines the billing period of the subscription. \* \`addon\` - A recurring component that can be added to a subscription in addition to its plan. \* \`charge\` - A non-recurring component that can be added to a subscription in addition to its plan. An charge can also be applied to a customer [directly](./invoices?prod_cat_ver=2#create_invoice_for_a_charge-item) without being applied to a subscription. + enum: + - plan + - addon + - charge + is_not: + type: string + description: | + \* \`plan\` - An essential component of a subscription. Every subscription has exactly one plan. It has a recurring charge and its period defines the billing period of the subscription. \* \`addon\` - A recurring component that can be added to a subscription in addition to its plan. \* \`charge\` - A non-recurring component that can be added to a subscription in addition to its plan. An charge can also be applied to a customer [directly](./invoices?prod_cat_ver=2#create_invoice_for_a_charge-item) without being applied to a subscription. + enum: + - plan + - addon + - charge + in: + pattern: "^\\[(plan|addon|charge)(,(plan|addon|charge))*\\]$" + type: string + not_in: + pattern: "^\\[(plan|addon|charge)(,(plan|addon|charge))*\\]$" + type: string + description: | + optional, enumerated string filter Filter item prices based on \`item_type\`. Possible values are : plan, addon, charge. \*\*Supported operators :\*\* is, is_not, in, not_in \*\*Example →\*\* \*item_type\\\[is_not\\\] = "plan"\* + example: plan + deprecated: false + currency_code: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + optional, string filter Filter item prices based on their \`currency_code\`. \*\*Supported operators :\*\* is, is_not, starts_with, in, not_in \*\*Example →\*\* \*currency_code\\\[is\\\] = "USD"\* + example: USD + deprecated: false + item_price: + type: object + properties: + id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + Filter item prices based on their \[id\](#). + example: basic_USD + deprecated: false + name: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + Filter item prices based on their \`name\`s. + example: basic USD + deprecated: false + pricing_model: + type: object + properties: + is: + type: string + description: | + \* \`flat_fee\` - A fixed price that is not quantity-based. \* \`per_unit\` - A fixed price per unit quantity. \* \`tiered\` - The per unit price is based on the tier that the total quantity falls in. \* \`volume\` - There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers. \* \`stairstep\` - A quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in. + enum: + - flat_fee + - per_unit + - tiered + - volume + - stairstep + is_not: + type: string + description: | + \* \`flat_fee\` - A fixed price that is not quantity-based. \* \`per_unit\` - A fixed price per unit quantity. \* \`tiered\` - The per unit price is based on the tier that the total quantity falls in. \* \`volume\` - There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers. \* \`stairstep\` - A quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in. + enum: + - flat_fee + - per_unit + - tiered + - volume + - stairstep + in: + pattern: "^\\[(flat_fee|per_unit|tiered|volume|stairstep)(,(flat_fee|per_unit|tiered|volume|stairstep))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(flat_fee|per_unit|tiered|volume|stairstep)(,(flat_fee|per_unit|tiered|volume|stairstep))*\\\ + ]$" + type: string + description: | + Filter item prices based on their \`pricing_model\`. + example: flat_fee + deprecated: false + item_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + Filter item prices based on their \`item_id\`. + example: basic + deprecated: false + price_variant_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + Filter item prices based on their \[price_variant_id\](price_variants#price_variant_id). + example: tamilNadu-India + deprecated: false + trial_period: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + Filter item prices based on their \`trial_period\`. + example: "14" + deprecated: false + trial_period_unit: + type: object + properties: + is: + type: string + description: | + \* \`day\` - A period of 24 hours. \* \`month\` - A period of 1 calendar month. + enum: + - day + - month + is_not: + type: string + description: | + \* \`day\` - A period of 24 hours. \* \`month\` - A period of 1 calendar month. + enum: + - day + - month + in: + pattern: "^\\[(day|month)(,(day|month))*\\]$" + type: string + not_in: + pattern: "^\\[(day|month)(,(day|month))*\\]$" + type: string + description: | + Filter item prices based on their \`trial_period_unit\`. + example: day + deprecated: false + status: + type: object + properties: + is: + type: string + description: | + \* \`active\` - The item price can be used in subscriptions. \* \`archived\` - The item price is no longer active and cannot be used in new subscriptions or added to existing ones. Existing subscriptions that already have this item price will continue to renew with the item price. \* \`deleted\` - Indicates that the item price has been deleted. The `id` and `name` can be reused. + enum: + - active + - archived + - deleted + is_not: + type: string + description: | + \* \`active\` - The item price can be used in subscriptions. \* \`archived\` - The item price is no longer active and cannot be used in new subscriptions or added to existing ones. Existing subscriptions that already have this item price will continue to renew with the item price. \* \`deleted\` - Indicates that the item price has been deleted. The `id` and `name` can be reused. + enum: + - active + - archived + - deleted + in: + pattern: "^\\[(active|archived|deleted)(,(active|archived|deleted))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(active|archived|deleted)(,(active|archived|deleted))*\\\ + ]$" + type: string + description: | + Filter item prices based on their \`status\`. + example: active + deprecated: false + updated_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + Filter item prices based on their \`updated_at\`. + example: "1243545465" + deprecated: false + period_unit: + type: object + properties: + is: + type: string + description: | + \* \`day\` - A period of 24 hours. \* \`week\` - A period of 7 days. \* \`month\` - A period of 1 calendar month. \* \`year\` - A period of 1 calendar year. + enum: + - day + - week + - month + - year + is_not: + type: string + description: | + \* \`day\` - A period of 24 hours. \* \`week\` - A period of 7 days. \* \`month\` - A period of 1 calendar month. \* \`year\` - A period of 1 calendar year. + enum: + - day + - week + - month + - year + in: + pattern: "^\\[(day|week|month|year)(,(day|week|month|year))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(day|week|month|year)(,(day|week|month|year))*\\\ + ]$" + type: string + description: | + Filter item prices based on their \`period_unit\`. + example: month + deprecated: false + period: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + description: | + Filter item prices based on their \`period\`. + example: "3" + deprecated: false + channel: + type: object + properties: + is: + type: string + description: "\\* \\`web\\` - The object was created (and\ + \ is maintained) for the web channel directly in Chargebee\ + \ via API or UI. \\* \\`app_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this\ + \ object via UI or API is disallowed. \\* \\`play_store\\\ + ` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of\ + \ this object via UI or API is disallowed. \n\nIn-App\ + \ Subscriptions is currently in early access. Contact\ + \ [eap@chargebee.com](mailto:eap@chargebee.com) for more\ + \ information.\n" + enum: + - web + - app_store + - play_store + is_not: + type: string + description: "\\* \\`web\\` - The object was created (and\ + \ is maintained) for the web channel directly in Chargebee\ + \ via API or UI. \\* \\`app_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this\ + \ object via UI or API is disallowed. \\* \\`play_store\\\ + ` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of\ + \ this object via UI or API is disallowed. \n\nIn-App\ + \ Subscriptions is currently in early access. Contact\ + \ [eap@chargebee.com](mailto:eap@chargebee.com) for more\ + \ information.\n" + enum: + - web + - app_store + - play_store + in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + description: | + The subscription channel this object originated from and is maintained in. + example: APP STORE + deprecated: false + description: | + Parameters for item_price + deprecated: false + encoding: + item_price: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - export + type: object + properties: + export: + $ref: '#/components/schemas/Export' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /exports/subscriptions: + post: + summary: Export Subscriptions + description: | + This API triggers export of subscription data. The exported zip file contains CSV files with subscription-related data. + operationId: export_subscriptions + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9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1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + export_type: + type: string + description: | + Determines the format of the data. Returns the export type based on the selected value. \* import_friendly_data - Download import friendly data in CSV. This CSV can be used to perform [bulk operations](https://www.chargebee.com/docs/bulk-operations.html). \* data - Download your current data in CSV. + deprecated: false + default: data + enum: + - data + - import_friendly_data + item_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + optional, string filter The plan item code. \*\*Supported operators :\*\* is, is_not, starts_with, in, not_in \*\*Example →\*\* \*item_id\\\[is\\\] = "silver"\* + example: silver + deprecated: false + item_price_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + optional, string filter The plan item price code. \*\*Supported operators :\*\* is, is_not, starts_with, in, not_in \*\*Example →\*\* \*item_price_id\\\[is\\\] = "silver-USD-monthly"\* + example: silver-USD-monthly + deprecated: false + cancel_reason_code: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + optional, string filter Reason code for canceling the subscription. Must be one from a list of reason codes set in the Chargebee app in \*\*Settings \\\> Configure Chargebee \\\> Reason Codes \\\> Subscriptions \\\> Subscription Cancellation\*\* . Must be passed if set as mandatory in the app. The codes are case-sensitive. \*\*Supported operators :\*\* is, is_not, starts_with, in, not_in \*\*Example →\*\* \*cancel_reason_code\\\[is\\\] = "Not Paid"\* + example: Not Paid + deprecated: false + subscription: + type: object + properties: + id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + A unique and immutable identifier for the subscription. If not provided, it is autogenerated. + example: 8gsnbYfsMLds + deprecated: false + customer_id: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + description: | + Identifier of the customer with whom this subscription is associated. + example: 8gsnbYfsMLds + deprecated: false + status: + type: object + properties: + is: + type: string + description: | + \* \`future\` - The subscription is scheduled to start at a future date. \* \`in_trial\` - The subscription is in trial. \* \`active\` - The subscription is active and will be charged for automatically based on the items in it. \* \`non_renewing\` - The subscription will be canceled at the end of the current term. \* \`paused\` - The subscription is [paused](https://www.chargebee.com/docs/2.0/pause-subscription.html). The subscription will not renew while in this state. \* \`cancelled\` - The subscription has been canceled and is no longer in service. \* \`transferred\` - The subscription has been transferred to another business entity within the organization. + enum: + - future + - in_trial + - active + - non_renewing + - paused + - cancelled + - transferred + is_not: + type: string + description: | + \* \`future\` - The subscription is scheduled to start at a future date. \* \`in_trial\` - The subscription is in trial. \* \`active\` - The subscription is active and will be charged for automatically based on the items in it. \* \`non_renewing\` - The subscription will be canceled at the end of the current term. \* \`paused\` - The subscription is [paused](https://www.chargebee.com/docs/2.0/pause-subscription.html). The subscription will not renew while in this state. \* \`cancelled\` - The subscription has been canceled and is no longer in service. \* \`transferred\` - The subscription has been transferred to another business entity within the organization. + enum: + - future + - in_trial + - active + - non_renewing + - paused + - cancelled + - transferred + in: + pattern: "^\\[(future|in_trial|active|non_renewing|paused|cancelled|transferred)(,(future|in_trial|active|non_renewing|paused|cancelled|transferred))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(future|in_trial|active|non_renewing|paused|cancelled|transferred)(,(future|in_trial|active|non_renewing|paused|cancelled|transferred))*\\\ + ]$" + type: string + description: | + Current state of the subscription + example: active + deprecated: false + cancel_reason: + type: object + properties: + is: + type: string + description: | + \* \`not_paid\` - Not Paid \* \`no_card\` - No Card \* \`fraud_review_failed\` - Fraud Review Failed \* \`non_compliant_eu_customer\` - Non Compliant EU Customer \* \`tax_calculation_failed\` - Tax Calculation Failed \* \`currency_incompatible_with_gateway\` - Currency incompatible with Gateway \* \`non_compliant_customer\` - Non Compliant Customer + enum: + - not_paid + - no_card + - fraud_review_failed + - non_compliant_eu_customer + - tax_calculation_failed + - currency_incompatible_with_gateway + - non_compliant_customer + is_not: + type: string + description: | + \* \`not_paid\` - Not Paid \* \`no_card\` - No Card \* \`fraud_review_failed\` - Fraud Review Failed \* \`non_compliant_eu_customer\` - Non Compliant EU Customer \* \`tax_calculation_failed\` - Tax Calculation Failed \* \`currency_incompatible_with_gateway\` - Currency incompatible with Gateway \* \`non_compliant_customer\` - Non Compliant Customer + enum: + - not_paid + - no_card + - fraud_review_failed + - non_compliant_eu_customer + - tax_calculation_failed + - currency_incompatible_with_gateway + - non_compliant_customer + in: + pattern: "^\\[(not_paid|no_card|fraud_review_failed|non_compliant_eu_customer|tax_calculation_failed|currency_incompatible_with_gateway|non_compliant_customer)(,(not_paid|no_card|fraud_review_failed|non_compliant_eu_customer|tax_calculation_failed|currency_incompatible_with_gateway|non_compliant_customer))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(not_paid|no_card|fraud_review_failed|non_compliant_eu_customer|tax_calculation_failed|currency_incompatible_with_gateway|non_compliant_customer)(,(not_paid|no_card|fraud_review_failed|non_compliant_eu_customer|tax_calculation_failed|currency_incompatible_with_gateway|non_compliant_customer))*\\\ + ]$" + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + The reason for canceling the subscription. Set by Chargebee automatically. + example: not_paid + deprecated: false + remaining_billing_cycles: + type: object + properties: + is: + pattern: ^-?\d+$ + type: string + format: number + is_not: + pattern: ^-?\d+$ + type: string + format: number + lt: + pattern: ^-?\d+$ + type: string + format: number + lte: + pattern: ^-?\d+$ + type: string + format: number + gt: + pattern: ^-?\d+$ + type: string + format: number + gte: + pattern: ^-?\d+$ + type: string + format: number + between: + pattern: "^\\[-?\\d+,-?\\d+\\]$" + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + \* When the subscription is not on a contract term: this value is the number of billing cycles remaining after the current cycle, at the end of which, the subscription cancels. \* When the subscription is on a \[contract term\](contract_terms): this value is the number of billing cycles remaining in the contract term after the current billing cycle. + example: "3" + deprecated: false + created_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + The time at which the subscription was created. + example: "1435054328" + deprecated: false + activated_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + is_present: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Time at which the subscription \`status\` last changed to \`active\`. For example, this value is updated when an \`in_trial\` or \`cancelled\` subscription activates. + example: "1435054328" + deprecated: false + next_billing_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + The date/time at which the next billing for the subscription happens. This is usually right after \`current_term_end\` unless multiple subscription terms were invoiced in advance using the \`terms_to_charge\` parameter. + example: "1435054328" + deprecated: false + cancelled_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + Time at which subscription was cancelled or is set to be cancelled. + example: "1435054328" + deprecated: false + has_scheduled_changes: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + If \`true\`, there are subscription changes scheduled on next renewal. + example: "true" + deprecated: false + updated_at: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + description: | + To filter based on \`updated_at\`. This attribute will be present only if the resource has been updated after 2016-09-28. It is advisable when using this filter, to pass the \`sort_by\` input parameter as \`updated_at\` for a faster response. + example: "1243545465" + deprecated: false + offline_payment_method: + type: object + properties: + is: + type: string + description: | + \* \`no_preference\` - No Preference \* \`cash\` - Cash \* \`check\` - Check \* \`bank_transfer\` - Bank Transfer \* \`ach_credit\` - ACH Credit \* \`sepa_credit\` - SEPA Credit \* \`boleto\` - Boleto \* \`us_automated_bank_transfer\` - US Automated Bank Transfer \* \`eu_automated_bank_transfer\` - EU Automated Bank Transfer \* \`uk_automated_bank_transfer\` - UK Automated Bank Transfer \* \`jp_automated_bank_transfer\` - JP Automated Bank Transfer \* \`mx_automated_bank_transfer\` - MX Automated Bank Transfer \* \`custom\` - Custom + enum: + - no_preference + - cash + - check + - bank_transfer + - ach_credit + - sepa_credit + - boleto + - us_automated_bank_transfer + - eu_automated_bank_transfer + - uk_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + - custom + is_not: + type: string + description: | + \* \`no_preference\` - No Preference \* \`cash\` - Cash \* \`check\` - Check \* \`bank_transfer\` - Bank Transfer \* \`ach_credit\` - ACH Credit \* \`sepa_credit\` - SEPA Credit \* \`boleto\` - Boleto \* \`us_automated_bank_transfer\` - US Automated Bank Transfer \* \`eu_automated_bank_transfer\` - EU Automated Bank Transfer \* \`uk_automated_bank_transfer\` - UK Automated Bank Transfer \* \`jp_automated_bank_transfer\` - JP Automated Bank Transfer \* \`mx_automated_bank_transfer\` - MX Automated Bank Transfer \* \`custom\` - Custom + enum: + - no_preference + - cash + - check + - bank_transfer + - ach_credit + - sepa_credit + - boleto + - us_automated_bank_transfer + - eu_automated_bank_transfer + - uk_automated_bank_transfer + - jp_automated_bank_transfer + - mx_automated_bank_transfer + - custom + in: + pattern: "^\\[(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom)(,(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom)(,(no_preference|cash|check|bank_transfer|ach_credit|sepa_credit|boleto|us_automated_bank_transfer|eu_automated_bank_transfer|uk_automated_bank_transfer|jp_automated_bank_transfer|mx_automated_bank_transfer|custom))*\\\ + ]$" + type: string + description: | + The preferred offline payment method for the subscription. + example: cash + deprecated: false + auto_close_invoices: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + description: | + Set to \`false\` to override for this subscription, the \[site-level setting\](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing) for auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute has a higher precedence than the same attribute at the \[customer level\](/docs/api/customers?prod_cat_ver=2#customer_auto_close_invoices). + example: "true" + deprecated: false + channel: + type: object + properties: + is: + type: string + description: "\\* \\`web\\` - The object was created (and\ + \ is maintained) for the web channel directly in Chargebee\ + \ via API or UI. \\* \\`app_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this\ + \ object via UI or API is disallowed. \\* \\`play_store\\\ + ` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of\ + \ this object via UI or API is disallowed. \n\nIn-App\ + \ Subscriptions is currently in early access. Contact\ + \ [eap@chargebee.com](mailto:eap@chargebee.com) for more\ + \ information.\n" + enum: + - web + - app_store + - play_store + is_not: + type: string + description: "\\* \\`web\\` - The object was created (and\ + \ is maintained) for the web channel directly in Chargebee\ + \ via API or UI. \\* \\`app_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this\ + \ object via UI or API is disallowed. \\* \\`play_store\\\ + ` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of\ + \ this object via UI or API is disallowed. \n\nIn-App\ + \ Subscriptions is currently in early access. Contact\ + \ [eap@chargebee.com](mailto:eap@chargebee.com) for more\ + \ information.\n" + enum: + - web + - app_store + - play_store + in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + description: | + The subscription channel this object originated from and is maintained in. + example: APP STORE + deprecated: false + description: | + Parameters for subscription + deprecated: false + encoding: + subscription: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - export + type: object + properties: + export: + $ref: '#/components/schemas/Export' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /full_exports/status: + get: + summary: Retrieve full export status + description: | + This endpoint retrieves the status of your data export request. + operationId: retrieve_full_export_status + parameters: + - name: table + in: query + description: "The name of the table for which the export status is to be retrieved.\ + \ For example, invoices." + required: true + deprecated: false + style: form + explode: true + schema: + maxLength: 200 + type: string + deprecated: false + - name: date + in: query + description: "The date for which the export status is required, formatted\ + \ in YYYY-MM-DD format. For example, 2023-08-29." + required: true + deprecated: false + style: form + explode: true + schema: + type: string + format: date + deprecated: false + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-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-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - full_export + type: object + properties: + full_export: + $ref: '#/components/schemas/FullExport' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /payment_intents/{payment-intent-id}: + get: + summary: Retrieve a payment intent + description: | + Retrieves the PaymentIntent resource. + operationId: retrieve_a_payment_intent + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[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?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: payment-intent-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - payment_intent + type: object + properties: + payment_intent: + $ref: '#/components/schemas/PaymentIntent' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + post: + summary: Update a payment intent + description: | + Updating properties on a PaymentIntent object. All the subsequent 3DS transaction attempts will have the updated values. + operationId: update_a_payment_intent + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-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))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: payment-intent-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + amount: + minimum: 0 + type: integer + description: | + Amount(in cents) to be authorized for 3DS flow. + format: int64 + deprecated: false + currency_code: + maxLength: 3 + type: string + description: | + The currency code (ISO 4217 format) of the amount used in transaction. + deprecated: false + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account used for performing the 3DS flow. + deprecated: false + payment_method_type: + type: string + description: | + The payment method of this intent. \* google_pay - google_pay \* boleto - boleto \* apple_pay - apple_pay \* faster_payments - Faster Payments \* klarna_pay_now - Klarna Pay Now \* ideal - ideal \* amazon_payments - Amazon Payments \* bancontact - bancontact \* netbanking_emandates - netbanking_emandates \* pay_to - PayTo \* venmo - Venmo \* card - card \* dotpay - dotpay \* giropay - giropay \* upi - upi \* sofort - sofort \* sepa_instant_transfer - Sepa Instant Transfer \* direct_debit - direct_debit \* paypal_express_checkout - paypal_express_checkout + deprecated: false + default: card + enum: + - card + - ideal + - sofort + - bancontact + - google_pay + - dotpay + - giropay + - apple_pay + - upi + - netbanking_emandates + - paypal_express_checkout + - direct_debit + - boleto + - venmo + - amazon_payments + - pay_to + - faster_payments + - sepa_instant_transfer + - klarna_pay_now + success_url: + maxLength: 250 + type: string + description: | + The URL the customer will be directed to once 3DS verification is successful. Applicable only when `payment_method_type` is `ideal`, `sofort`, `dotpay` or `giropay`. + deprecated: false + failure_url: + maxLength: 250 + type: string + description: | + The URL the customer will be directed to when 3DS verification fails. Applicable only when `payment_method_type` is `ideal`, `sofort`, `dotpay` or `giropay`. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - payment_intent + type: object + properties: + payment_intent: + $ref: '#/components/schemas/PaymentIntent' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /payment_intents: + post: + summary: Create a payment intent + description: | + Creates a PaymentIntent object. This is to be used with Chargebee.js API to complete the 3DS flow for new or stored cards. + + While creating, specify the appropriate gateway account and amount. Exact amount can be estimated using our [Estimate API](/docs/api/estimates). + + #### Customer resource lookup and creation {#customer_lookup} + + When [customer[id]](/docs/api/payment_intents#create_a_payment_intent_customer_id) is provided for this operation, it is looked up by Chargebee, and if found, the payment_intent is created for it. If not found, a new customer resource is created with the ID provided, and the payment_intent is created. + + ##### Multiple business entities + + If multiple [business entities](/docs/api/advanced-features#mbe) are created for the site, the customer resource lookup and creation happen within the [context](/docs/api/advanced-features#mbe-context) of the business entity [specified](/docs/api/advanced-features#mbe-header-main) in this API call. If no business entity is specified, the customer resource lookup is performed within the [site context](/docs/api/advanced-features#mbe-context), and if not found, the resource is created for the [default business entity](/docs/api/advanced-features#mbe-default-be) of the site. + operationId: create_a_payment_intent + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|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?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - amount + - currency_code + type: object + properties: + business_entity_id: + maxLength: 50 + type: string + description: "Sets the [context]() for this operation to the [business\ + \ entity](/docs/api/advanced-features?prod_cat_ver=2#mbe) specified.\ + \ Applicable only when multiple business entities have been created\ + \ for the site. When this parameter is provided, the operation\ + \ is able to read/write data associated only to the business entity\ + \ specified. When not provided, the operation can read/write data\ + \ for the entire site. \n**Note**\n\nAn alternative way of passing\ + \ this parameter is by means of a [custom HTTP header](/docs/api/advanced-features?prod_cat_ver=2#mbe-header-main).\ + \ \n**See also**\n\n[Customer resource lookup and creation.](/docs/api/payment_intents#customer_lookup)\n" + deprecated: false + customer_id: + maxLength: 50 + type: string + description: "The unique ID of the customer for which this `payment_intent`\ + \ should be created. If not provided, a new customer is created\ + \ and its ID is autogenerated. \n**See also**\n\n[Customer resource\ + \ lookup and creation](/docs/api/payment_intents#customer_lookup)\n\ + .\n" + deprecated: false + amount: + minimum: 0 + type: integer + description: | + Amount(in cents) to be authorized for 3DS flow. + format: int64 + deprecated: false + currency_code: + maxLength: 3 + type: string + description: | + The currency code (ISO 4217 format) of the amount used in transaction. + deprecated: false + gateway_account_id: + maxLength: 50 + type: string + description: | + The gateway account used for performing the 3DS flow. + deprecated: false + reference_id: + maxLength: 200 + type: string + description: | + Reference for payment method at gateway. Only applicable when the PaymentIntent is created for cards stored in the gateway. + deprecated: false + payment_method_type: + type: string + description: | + The payment method of this intent. \* google_pay - google_pay \* boleto - boleto \* apple_pay - apple_pay \* faster_payments - Faster Payments \* klarna_pay_now - Klarna Pay Now \* ideal - ideal \* amazon_payments - Amazon Payments \* bancontact - bancontact \* netbanking_emandates - netbanking_emandates \* pay_to - PayTo \* venmo - Venmo \* card - card \* dotpay - dotpay \* giropay - giropay \* upi - upi \* sofort - sofort \* sepa_instant_transfer - Sepa Instant Transfer \* direct_debit - direct_debit \* paypal_express_checkout - paypal_express_checkout + deprecated: false + default: card + enum: + - card + - ideal + - sofort + - bancontact + - google_pay + - dotpay + - giropay + - apple_pay + - upi + - netbanking_emandates + - paypal_express_checkout + - direct_debit + - boleto + - venmo + - amazon_payments + - pay_to + - faster_payments + - sepa_instant_transfer + - klarna_pay_now + success_url: + maxLength: 250 + type: string + description: | + The URL the customer will be directed to once 3DS verification is successful. Applicable only when `payment_method_type` is `ideal`, `sofort`, `dotpay` or `giropay`. + deprecated: false + failure_url: + maxLength: 250 + type: string + description: | + The URL the customer will be directed to when 3DS verification fails. Applicable only when `payment_method_type` is `ideal`, `sofort`, `dotpay` or `giropay`. + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - payment_intent + type: object + properties: + payment_intent: + $ref: '#/components/schemas/PaymentIntent' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /custom_field_configs/retrieve: + get: + summary: Retrieve the meta data + description: | + Retrieves meta data of specific custom field. + operationId: retrieve_the_meta_data + parameters: + - name: entity_type + in: query + description: |- + Allowed entity types for custom fields. + * customer - Entity that represents a customer + * addon_item - Entity that represents item of type addon + * plan - Entity that represents a subscription plan + * subscription - Entity that represents a subscription of a customer + * charge_price - Entity that represents charge price + * item_family - Entity that represents item family + * addon - Entity that represents an addon + * addon_price - Entity that represents addon price + * charge_item - Entity that represents item of type charge + * plan_item - Entity that represents item of type plan + * plan_price - Entity that represents plan price + required: true + deprecated: false + style: form + explode: true + schema: + type: string + deprecated: false + enum: + - customer + - subscription + - plan + - addon + - item_family + - plan_item + - addon_item + - charge_item + - plan_price + - addon_price + - charge_price + - name: api_name + in: query + description: Custom field identifier. + required: true + deprecated: false + style: form + explode: true + schema: + maxLength: 50 + type: string + deprecated: false + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0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A-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - custom_field_config + type: object + properties: + custom_field_config: + $ref: '#/components/schemas/CustomFieldConfig' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /custom_field_configs: + get: + summary: List custom field configs + description: | + Retrieves the list of custom fields meta data. + operationId: list_custom_field_configs + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(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:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: entity_type + in: query + description: |- + Allowed entity types for custom fields. + * customer - Entity that represents a customer + * addon_item - Entity that represents item of type addon + * plan - Entity that represents a subscription plan + * subscription - Entity that represents a subscription of a customer + * charge_price - Entity that represents charge price + * item_family - Entity that represents item family + * addon - Entity that represents an addon + * addon_price - Entity that represents addon price + * charge_item - Entity that represents item of type charge + * plan_item - Entity that represents item of type plan + * plan_price - Entity that represents plan price + required: false + deprecated: false + style: form + explode: true + schema: + type: string + deprecated: false + enum: + - customer + - subscription + - plan + - addon + - item_family + - plan_item + - addon_item + - charge_item + - plan_price + - addon_price + - charge_price + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - custom_field_config + type: object + properties: + custom_field_config: + $ref: '#/components/schemas/CustomFieldConfig' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /item_families/{item-family-id}/delete: + post: + summary: Delete an item family + description: | + Deletes an item family, marking its `status` as `deleted`. This is not allowed if there are `active` items under the item family. Once deleted, the `id` and `name` of the item family can be reused to create a new item family. + operationId: delete_an_item_family + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|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(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: item-family-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - item_family + type: object + properties: + item_family: + $ref: '#/components/schemas/ItemFamily' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /item_families: + get: + summary: List item families + description: | + Returns a list of item families satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order. + operationId: list_item_families + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-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1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: id + in: query + description: "optional, string filter
The\ + \ identifier for the item family. It is unique and immutable.
Supported\ + \ operators : is, is_not, starts_with, in, not_in

Example\ + \ id[is] = \"family-id\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: family-id + deprecated: false + - name: name + in: query + description: "optional, string filter
A\ + \ unique display name for the item family. This is visible only in Chargebee\ + \ and not to customers.
Supported operators : is, is_not, starts_with

Example\ + \ name[is_not] = \"family-name\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + example: family-name + deprecated: false + - name: updated_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
When the item family was last updated.
Supported\ + \ operators : after, before, on, between

Example updated_at[before] = \"1243545465\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1243545465" + deprecated: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - item_family + type: object + properties: + item_family: + $ref: '#/components/schemas/ItemFamily' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + post: + summary: Create an item family + description: | + This endpoint creates an item family for your product line or service. + operationId: create_an_item_family + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\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:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - id + - name + type: object + properties: + id: + maxLength: 50 + type: string + description: | + The identifier for the item family. Must be unique and is immutable. + deprecated: false + name: + maxLength: 50 + type: string + description: | + The display name for the item family. Must be unique. This is visible only in Chargebee and not to customers. + deprecated: false + description: + maxLength: 500 + type: string + description: | + Description of the item family. This is visible only in Chargebee and not to customers. + deprecated: false + additionalProperties: true + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - item_family + type: object + properties: + item_family: + $ref: '#/components/schemas/ItemFamily' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /item_families/{item-family-id}: + get: + summary: Retrieve an item family + description: | + This endpoint retrieves an item family based on the item family id. + operationId: retrieve_an_item_family + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})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:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: item-family-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - item_family + type: object + properties: + item_family: + $ref: '#/components/schemas/ItemFamily' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + post: + summary: Update an item family + description: | + This endpoint updates the name and/or description of the item family. + operationId: update_an_item_family + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\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4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: item-family-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + name: + maxLength: 50 + type: string + description: | + The display name for the item family. Must be unique. This is visible only in Chargebee and not to customers. + deprecated: false + description: + maxLength: 500 + type: string + description: | + Description of the item family. This is visible only in Chargebee and not to customers. + deprecated: false + additionalProperties: true + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - item_family + type: object + properties: + item_family: + $ref: '#/components/schemas/ItemFamily' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /products/{product-id}: + get: + summary: Retrieve a product + description: | + Retrieve a product using `product_id`. + operationId: retrieve_a_product + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][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|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: product-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - product + type: object + properties: + product: + $ref: '#/components/schemas/Product' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + post: + summary: Update a product + description: "This API allows you to update specific product details. \n\n\ + The following table will help you to understand the status of the mapped [item](https://apidocs.chargebee.com/docs/api/items?prod_cat_ver=2#item_status)\ + \ and [item_price](https://apidocs.chargebee.com/docs/api/item_prices?prod_cat_ver=2#item_price_status)\ + \ after passing product [status](https://apidocs.chargebee.com/docs/api/products?prod_cat_ver=2#update_a_product_status)\ + \ value during product updation.\n\n|-------------------------------------|--------------------------------|\n\ + | **Product Status**(Input parameter) | **Item and Item Price Status** |\n\ + | **active** | **active** |\n\ + | **inactive** | **archived** |\n\ + \n" + operationId: update_a_product + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(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0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: product-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + name: + maxLength: 100 + type: string + description: | + A unique internal name for the product. This is only visible in Chargebee. + deprecated: false + external_name: + maxLength: 100 + type: string + description: | + The unique name that appears for each product to the end user. + deprecated: false + description: + maxLength: 500 + type: string + description: | + Description of the product. + deprecated: false + status: + type: string + description: | + Status of the product. Refer to the [table](https://apidocs.chargebee.com/docs/api/products?prod_cat_ver=2#update_a_product) for more information. \* active - The active products are visible on the storefront, subscription, or checkout. \* inactive - The inactive products are not visible on the storefront, subscription, or checkout. + deprecated: false + default: active + enum: + - active + - inactive + sku: + maxLength: 100 + type: string + description: | + A unique identifier code a seller assigns to each product or item. Retailers and merchants use SKUs to keep track of inventory and sales data and help organize products within a store or warehouse. SKUs can include a combination of letters, numbers, and symbols and can vary in length depending on the seller's needs. + deprecated: false + shippable: + type: boolean + description: | + Whether a product is shippable or not. Pass the value as `true` if it is a shippable physical product, else pass the value as `false`. + deprecated: false + default: true + metadata: + type: object + additionalProperties: true + description: | + A collection of key-value pairs that provides extra information about the product. \*\*Note:\*\* There's a character limit of 65,535. \[Learn more\](advanced-features#metadata). + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - product + type: object + properties: + product: + $ref: '#/components/schemas/Product' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /products/{product-id}/delete: + post: + summary: Delete a product + description: | + This API deletes a product and changes the delete attribute value to `true`. Deletion of a product is not allowed if there are `active` or `archived` variants under the product or if there are items mapped to the product. Once deleted, the `name` of the product can be reused. + operationId: delete_a_product + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|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|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: product-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - product + type: object + properties: + product: + $ref: '#/components/schemas/Product' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /products/{product-id}/update_options: + post: + summary: Add remove or update options for the product + description: | + This API allows you to add, remove, or update product options. + operationId: add_remove_or_update_options_for_the_product + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25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F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: product-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + remove_options: + type: array + description: | + List of options that you want to remove from the product. You can provide option names. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + options: + required: + - name + type: object + properties: + name: + type: array + description: | + Unique name of the option. + items: + maxLength: 100 + type: string + deprecated: false + values: + type: array + description: | + List of possible values for the option. For example. if the option name is Size(options\[name\]\[1\]="Size"), then the values can be Small, Medium, and Large(options\[values\]\[1\]=\["Small", "Medium", "Large"\]). + items: + type: array + deprecated: false + items: {} + default_value: + type: array + description: | + Set the default value of an option. + items: + maxLength: 100 + type: string + deprecated: false + description: | + The list of options that you want to add when the \`options\[name\]\` are absent in a product, you can use this parameter to update the option values that already exist in a product. + deprecated: false + encoding: + options: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - product + type: object + properties: + product: + $ref: '#/components/schemas/Product' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /products: + get: + summary: List products + description: | + This API retrieves the list of products that are `active` or `inactive`. Use `include_deleted` parameter to include deleted products with `active` and `inactive` products. + operationId: list_products + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})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:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: include_deleted + in: query + description: "If set to true, it includes the deleted products\ + \ in the API response." + required: false + style: form + explode: true + schema: + type: boolean + default: false + - name: id + in: query + description: "optional, string filter
Filter\ + \ product based on their id.
Supported operators\ + \ : is, is_not, starts_with, in, not_in

Example id[is] = \"basic\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: basic + deprecated: false + - name: name + in: query + description: "optional, string filter
Filter\ + \ product based on their names.
Supported operators :\ + \ is, is_not, starts_with, in, not_in

Example name[is] = \"basic\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: basic + deprecated: false + - name: status + in: query + description: "optional, enumerated string filter
Filter\ + \ product based on their status. Possible values are : active,\ + \ inactive.
Supported operators : is, is_not, in, not_in

Example\ + \ status[is] = \"basic\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`active\` - active \* \`inactive\` - inactive + enum: + - active + - inactive + is_not: + type: string + description: | + \* \`active\` - active \* \`inactive\` - inactive + enum: + - active + - inactive + in: + pattern: "^\\[(active|inactive)(,(active|inactive))*\\]$" + type: string + not_in: + pattern: "^\\[(active|inactive)(,(active|inactive))*\\]$" + type: string + example: basic + deprecated: false + - name: shippable + in: query + description: "optional, boolean filter
Filter\ + \ product based on whether it is shippable or not. Possible values are :\ + \ true, false
Supported operators : is

Example\ + \ shippable[is] = \"true\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + example: "true" + deprecated: false + - name: has_variant + in: query + description: "optional, boolean filter
Filter\ + \ product based on whether it has variants or not. Possible values are :\ + \ true, false
Supported operators : is

Example\ + \ has_variant[is] = \"true\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + example: "true" + deprecated: false + - name: created_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
Filter product based on their created time.
Supported\ + \ operators : after, before, on, between

Example created_at[after] = \"1243545465\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1243545465" + deprecated: false + - name: updated_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
Filter product based on their updated time.
Supported\ + \ operators : after, before, on, between

Example updated_at[after] = \"1243545465\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1243545465" + deprecated: false + - name: sort_by + in: query + description: "optional, string filter
Sorts\ + \ based on the specified attribute.
Supported attributes : name,\ + \ id, created_at, updated_at
Supported sort-orders : asc,\ + \ desc

Example sort_by[asc]\ + \ = \"name\"
This will sort the result based on the 'name' attribute\ + \ in ascending(earliest first) order." + required: false + style: deepObject + explode: true + schema: + minProperties: 1 + type: object + properties: + asc: + type: string + enum: + - name + - id + - created_at + - updated_at + desc: + type: string + enum: + - name + - id + - created_at + - updated_at + additionalProperties: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - product + type: object + properties: + product: + $ref: '#/components/schemas/Product' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + post: + summary: Create a product + description: | + This API creates a new product. + operationId: create_a_product + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - external_name + - name + - status + type: object + properties: + name: + maxLength: 100 + type: string + description: | + A unique internal name for the product. This is only visible in Chargebee. + deprecated: false + external_name: + maxLength: 100 + type: string + description: | + The unique name that appears to the end user for each product. + deprecated: false + status: + type: string + description: | + Status of the product. \* active - The active products are visible on the storefront, subscription, or checkout. \* inactive - The inactive products are not visible on the storefront, subscription, or checkout. + deprecated: false + default: active + enum: + - active + - inactive + id: + maxLength: 100 + type: string + description: | + The immutable unique identifier of the product. If not passed, it will get autogenerated. + deprecated: false + description: + maxLength: 500 + type: string + description: | + Description of the product. + deprecated: false + sku: + maxLength: 100 + type: string + description: | + A unique identifier code a seller assigns to each product or item. Retailers and merchants use SKUs to keep track of inventory and sales data and help organize products within a store or warehouse. SKUs can include a combination of letters, numbers, and symbols and can vary in length depending on the seller's needs. + deprecated: false + metadata: + type: object + additionalProperties: true + description: | + A collection of key-value pairs that provides extra information about the product. \*\*Note:\*\* There's a character limit of 65,535. \[Learn more\](advanced-features#metadata). + deprecated: false + shippable: + type: boolean + description: | + Whether a product is shippable or not. Pass the value as `true` if it is a shippable physical product, else pass the value as `false`. + deprecated: false + default: true + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - product + type: object + properties: + product: + $ref: '#/components/schemas/Product' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /products/{product-id}/variants: + get: + summary: List product variants + description: | + This API retrieves the list of product variants. + operationId: list_product_variants + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9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1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: product-id + in: path + required: true + style: simple + explode: false + schema: + type: string + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: include_deleted + in: query + description: "If set to true, it includes the deleted variants\ + \ in the API response." + required: false + style: form + explode: true + schema: + type: boolean + default: false + - name: id + in: query + description: "optional, string filter
Filter\ + \ variant based on their id.
Supported operators\ + \ : is, is_not, starts_with, in, not_in

Example id[is_not] = \"basic\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: basic + deprecated: false + - name: name + in: query + description: "optional, string filter
Filter\ + \ variant based on their names.
Supported operators :\ + \ is, is_not, starts_with, in, not_in

Example name[is] = \"basic\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: basic + deprecated: false + - name: sku + in: query + description: "optional, string filter
Filter\ + \ variant based on their sku.
Supported operators : is,\ + \ is_not, starts_with, in, not_in

Example sku[is] = \"basic\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: basic + deprecated: false + - name: status + in: query + description: "optional, enumerated string filter
Filter\ + \ variant based on their status. Possible values are : active,\ + \ inactive.
Supported operators : is, is_not, in, not_in

Example\ + \ status[is] = \"active\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`active\` - active \* \`inactive\` - inactive + enum: + - active + - inactive + is_not: + type: string + description: | + \* \`active\` - active \* \`inactive\` - inactive + enum: + - active + - inactive + in: + pattern: "^\\[(active|inactive)(,(active|inactive))*\\]$" + type: string + not_in: + pattern: "^\\[(active|inactive)(,(active|inactive))*\\]$" + type: string + example: active + deprecated: false + - name: updated_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
Filter product based on their updated time.
Supported\ + \ operators : after, before, on, between

Example updated_at[before] = \"basic\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: basic + deprecated: false + - name: created_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
Filter product based on their created time.
Supported\ + \ operators : after, before, on, between

Example created_at[before] = \"basic\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: basic + deprecated: false + - name: sort_by + in: query + description: "optional, string filter
Sorts\ + \ based on the specified attribute.
Supported attributes : name,\ + \ id, status, created_at, updated_at
Supported sort-orders :\ + \ asc, desc

Example sort_by[asc] = \"name\"
This will sort the result\ + \ based on the 'name' attribute in ascending(earliest first) order." + required: false + style: deepObject + explode: true + schema: + minProperties: 1 + type: object + properties: + asc: + type: string + enum: + - name + - id + - status + - created_at + - updated_at + desc: + type: string + enum: + - name + - id + - status + - created_at + - updated_at + additionalProperties: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - variant + type: object + properties: + variant: + $ref: '#/components/schemas/Variant' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + post: + summary: Create a product variant + description: |+ + This API is used for creating a new product variant. + + The following table will help you to understand the state of the variant `status` after passing [status](https://apidocs.chargebee.com/docs/api/variants?prod_cat_ver=2#create_a_product_variant_status) value during variant creation. + + * **Parameter Value** column holds possible inputs to the `variant.status`. + + * **Product Status** column states the status of the associated product. + + * **Variant Status** column states the value of the variant status once the variant is created. + + + + |------------------------------|--------------------|--------------------| + | **Parameter Value** | **Product Status** | **Variant Status** | + | No value passed | **active** | **active** | + | No value passed | **inactive** | **inactive** | + | Value passed as **active** | **active** | **active** | + | Value passed as **inactive** | **active** | **inactive** | + | Value passed as **active** | **inactive** | **not allowed** | + | Value passed as **inactive** | **inactive** | **inactive** | + + operationId: create_a_product_variant + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: product-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - name + type: object + properties: + id: + maxLength: 100 + type: string + description: | + The immutable unique identifier of a product variant. If not passed, it will get autogenerated. + deprecated: false + name: + maxLength: 100 + type: string + description: | + This is a unique name that appears for each product variant to the end user. + deprecated: false + external_name: + maxLength: 100 + type: string + description: | + The unique name that appears for each product variant to the end user. + deprecated: false + description: + maxLength: 500 + type: string + description: | + A detailed description of this product variant. + deprecated: false + sku: + maxLength: 100 + type: string + description: | + A unique identifier code a seller assigns to each product variant. Retailers and merchants use SKUs to keep track of inventory and sales data and help organize products within a store or warehouse. SKUs can include a combination of letters, numbers, and symbols and can vary in length depending on the seller's needs. + deprecated: false + metadata: + type: object + additionalProperties: true + description: | + A collection of key-value pairs that provides extra information about the product. \*\*Note:\*\* There's a character limit of 65,535. \[Learn more\](advanced-features#metadata). + deprecated: false + status: + type: string + description: | + Status of the product variant. Refer to the [table](https://apidocs.chargebee.com/docs/api/variants?prod_cat_ver=2#create_a_product_variant) for more information. \* active - The active product variants are visible on the storefront, subscription, or checkout. \* inactive - The inactive product variants are not visible on the storefront, subscription, or checkout. + deprecated: false + enum: + - active + - inactive + option_values: + required: + - name + - value + type: object + properties: + name: + type: array + description: | + Name of the option values. + items: + maxLength: 100 + type: string + deprecated: false + value: + type: array + description: | + Pass values of the `option_values` + items: + maxLength: 100 + type: string + deprecated: false + description: | + List of product variants option values. + deprecated: false + encoding: + option_values: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - variant + type: object + properties: + variant: + $ref: '#/components/schemas/Variant' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /variants/{product-variant-id}: + get: + summary: Retrieve a product variant + description: | + This API is used to retrieve a product variant using `variant_id`. + operationId: retrieve_a_product_variant + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(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?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: product-variant-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - variant + type: object + properties: + variant: + $ref: '#/components/schemas/Variant' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + post: + summary: Update a product variant + description: | + This API is used to modify a product variant. + operationId: update_a_product_variant + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(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))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: product-variant-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + name: + maxLength: 100 + type: string + description: | + This is a unique name that appears for each product variant to the end user. + deprecated: false + description: + maxLength: 500 + type: string + description: | + A detailed description of this product variant. + deprecated: false + status: + type: string + description: | + Status of the product variant. \* active - The active product variants are visible on the storefront, subscription, or checkout. \* inactive - The inactive product variants are not visible on the storefront, subscription, or checkout. + deprecated: false + enum: + - active + - inactive + external_name: + maxLength: 100 + type: string + description: | + The unique name that appears for each product variant to the end user. + deprecated: false + sku: + maxLength: 100 + type: string + description: | + A unique identifier code a seller assigns to each product variant. Retailers and merchants use SKUs to keep track of inventory and sales data and help organize products within a store or warehouse. SKUs can include a combination of letters, numbers, and symbols and can vary in length depending on the seller's needs. + deprecated: false + metadata: + type: object + additionalProperties: true + description: | + A collection of key-value pairs that provides extra information about the variant. \*\*Note:\*\* There's a character limit of 65,535. \[Learn more\](advanced-features#metadata). + deprecated: false + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - variant + type: object + properties: + variant: + $ref: '#/components/schemas/Variant' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /variants/{product-variant-id}/delete: + post: + summary: Delete a product variant + description: | + This API deletes a product variant and returns the delete attribute value as `true`. Deletion of a product variant is not allowed if there are `active` or `archived` `item_price_id` under the variant. Once the variant is deleted, the `id` and `name` of the product variant can be reused. + operationId: delete_a_product_variant + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?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:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: product-variant-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - variant + type: object + properties: + variant: + $ref: '#/components/schemas/Variant' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /items: + get: + summary: List items + description: | + Returns a list of items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by date of creation, in descending order. + operationId: list_items + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]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1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: id + in: query + description: "optional, string filter
Filter\ + \ items based on item id.
Supported operators : is, is_not, starts_with,\ + \ in, not_in

Example id[is]\ + \ = \"basic\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: basic + deprecated: false + - name: item_family_id + in: query + description: "optional, string filter
Filter\ + \ items based on item_family_id.
Supported operators\ + \ : is, is_not, starts_with, in, not_in

Example item_family_id[is] = \"acme\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: acme + deprecated: false + - name: type + in: query + description: "optional, enumerated string filter
Filter\ + \ items based on item type. Possible values are : plan,\ + \ addon, charge.
Supported operators : is, is_not, in, not_in

Example\ + \ type[is] = \"plan\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`plan\` - An essential component of a subscription. Every subscription has exactly one plan. It has a recurring charge and its period defines the billing period of the subscription. \* \`addon\` - A recurring component that can be added to a subscription in addition to its plan. \* \`charge\` - A non-recurring component that can be added to a subscription in addition to its plan. An charge can also be applied to a customer [directly](./invoices?prod_cat_ver=2#create_invoice_for_a_charge-item) without being applied to a subscription. + enum: + - plan + - addon + - charge + is_not: + type: string + description: | + \* \`plan\` - An essential component of a subscription. Every subscription has exactly one plan. It has a recurring charge and its period defines the billing period of the subscription. \* \`addon\` - A recurring component that can be added to a subscription in addition to its plan. \* \`charge\` - A non-recurring component that can be added to a subscription in addition to its plan. An charge can also be applied to a customer [directly](./invoices?prod_cat_ver=2#create_invoice_for_a_charge-item) without being applied to a subscription. + enum: + - plan + - addon + - charge + in: + pattern: "^\\[(plan|addon|charge)(,(plan|addon|charge))*\\]$" + type: string + not_in: + pattern: "^\\[(plan|addon|charge)(,(plan|addon|charge))*\\]$" + type: string + example: plan + deprecated: false + - name: name + in: query + description: "optional, string filter
Filter\ + \ items based on item name.
Supported operators : is,\ + \ is_not, starts_with

Example →\ + name[is_not] = \"basic\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + example: basic + deprecated: false + - name: item_applicability + in: query + description: "optional, enumerated string filter
Filter\ + \ items based on item_applicability. Possible values are :\ + \ all, restricted.
Supported operators : is, is_not,\ + \ in, not_in

Example item_applicability[is_not]\ + \ = \"all\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`all\` - all addon-items and charge-items are applicable to this plan-item. \* \`restricted\` - only the addon-items or charge-items provided in `applicable_items` can be applied to this plan-item. + enum: + - all + - restricted + is_not: + type: string + description: | + \* \`all\` - all addon-items and charge-items are applicable to this plan-item. \* \`restricted\` - only the addon-items or charge-items provided in `applicable_items` can be applied to this plan-item. + enum: + - all + - restricted + in: + pattern: "^\\[(all|restricted)(,(all|restricted))*\\]$" + type: string + not_in: + pattern: "^\\[(all|restricted)(,(all|restricted))*\\]$" + type: string + example: all + deprecated: false + - name: status + in: query + description: "optional, enumerated string filter
Filter\ + \ items based on item status. Possible values are : active,\ + \ archived, deleted.
Supported operators : is, is_not, in,\ + \ not_in

Example status[is]\ + \ = \"active\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`active\` - The item can be used to create new item prices. \* \`archived\` - The item is no longer active and no new item prices can be created \* \`deleted\` - Indicates that the item has been [deleted](./items?prod_cat_ver=2#delete_an_item). The `id` and `name` can be reused. Deleted items can be retrieved using [List items](./items?prod_cat_ver=2#list_items). + enum: + - active + - archived + - deleted + is_not: + type: string + description: | + \* \`active\` - The item can be used to create new item prices. \* \`archived\` - The item is no longer active and no new item prices can be created \* \`deleted\` - Indicates that the item has been [deleted](./items?prod_cat_ver=2#delete_an_item). The `id` and `name` can be reused. Deleted items can be retrieved using [List items](./items?prod_cat_ver=2#list_items). + enum: + - active + - archived + - deleted + in: + pattern: "^\\[(active|archived|deleted)(,(active|archived|deleted))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(active|archived|deleted)(,(active|archived|deleted))*\\\ + ]$" + type: string + example: active + deprecated: false + - name: is_giftable + in: query + description: "optional, boolean filter
Specifies\ + \ if gift subscriptions can be created for this item. Possible values are\ + \ : true, false
Supported operators : is

Example\ + \ is_giftable[is] = \"true\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + example: "true" + deprecated: false + - name: updated_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
Filter items based on when the items were last updated.
Supported\ + \ operators : after, before, on, between

Example updated_at[after] = \"1243545465\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1243545465" + deprecated: false + - name: enabled_for_checkout + in: query + description: "optional, boolean filter
Allow\ + \ the plan to subscribed to via Checkout. Applies only for plan-items.
Note:\ + \ Only the in-app version of Checkout is supported for Product Catalog v2.\ + \ Possible values are : true, false
Supported operators : is

Example\ + \ enabled_for_checkout[is]\ + \ = \"null\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + deprecated: false + example: null + - name: enabled_in_portal + in: query + description: "optional, boolean filter
Allow\ + \ customers to change their subscription to this plan via the Self-Serve Portal. Applies only for plan-items. This requires\ + \ the Portal configuration to allow changing subscriptions. Possible values are\ + \ : true, false
Supported operators : is

Example\ + \ enabled_in_portal[is] =\ + \ \"null\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + deprecated: false + example: null + - name: metered + in: query + description: "optional, boolean filter
Specifies\ + \ whether the item undergoes metered billing. When true, the\ + \ quantity is calculated from usage records. When false, the quantity is\ + \ as determined while adding an item price to the subscription. Applicable\ + \ only for items of type plan or addon\ + \ and when Metered Billing is enabled.\ + \ The value of this attribute cannot be changed. Possible values are : true,\ + \ false
Supported operators : is

Example metered[is] = \"true\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + format: boolean + enum: + - "true" + - "false" + example: "true" + deprecated: false + - name: usage_calculation + in: query + description: "optional, enumerated string filter
How\ + \ the quantity is calculated from usage data for the item prices belonging\ + \ to this item. Only applicable when the item is metered. This\ + \ value overrides the one set at the site level.\ + \ . Possible values are : sum_of_usages, last_usage, max_usage.
Supported\ + \ operators : is, is_not, in, not_in

Example usage_calculation[is_not] = \"SUM_OF_USAGES\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`sum_of_usages\` - the net quantity is the sum of the `quantity` of all usages for the current term. \* \`last_usage\` - from among the usage records for the [item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) with `usage_date` within the relevant billing period, the `quantity` of the usage record with the most recent `usage_date` is taken as the net quantity consumed. \* \`max_usage\` - from among the usage records for the [item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) with `usage_date` within the relevant billing period, the `quantity` of the usage record with the maximum value is taken as the net quantity consumed. + enum: + - sum_of_usages + - last_usage + - max_usage + is_not: + type: string + description: | + \* \`sum_of_usages\` - the net quantity is the sum of the `quantity` of all usages for the current term. \* \`last_usage\` - from among the usage records for the [item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) with `usage_date` within the relevant billing period, the `quantity` of the usage record with the most recent `usage_date` is taken as the net quantity consumed. \* \`max_usage\` - from among the usage records for the [item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) with `usage_date` within the relevant billing period, the `quantity` of the usage record with the maximum value is taken as the net quantity consumed. + enum: + - sum_of_usages + - last_usage + - max_usage + in: + pattern: "^\\[(sum_of_usages|last_usage|max_usage)(,(sum_of_usages|last_usage|max_usage))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(sum_of_usages|last_usage|max_usage)(,(sum_of_usages|last_usage|max_usage))*\\\ + ]$" + type: string + example: SUM_OF_USAGES + deprecated: false + - name: channel + in: query + description: "optional, enumerated string filter
The\ + \ subscription channel this object originated from and is maintained in.\ + \ Possible values are : web, app_store, play_store.
Supported\ + \ operators : is, is_not, in, not_in

Example channel[is] = \"APP STORE\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: "\\* \\`web\\` - The object was created (and is maintained)\ + \ for the web channel directly in Chargebee via API or UI. \\* \\\ + `app_store\\` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this object via\ + \ UI or API is disallowed. \\* \\`play_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of this object\ + \ via UI or API is disallowed. \n\nIn-App Subscriptions is currently\ + \ in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com)\ + \ for more information.\n" + enum: + - web + - app_store + - play_store + is_not: + type: string + description: "\\* \\`web\\` - The object was created (and is maintained)\ + \ for the web channel directly in Chargebee via API or UI. \\* \\\ + `app_store\\` - The object data is synchronized with data from [in-app\ + \ subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Apple App Store. Direct manipulation of this object via\ + \ UI or API is disallowed. \\* \\`play_store\\` - The object data\ + \ is synchronized with data from [in-app subscription(s)](https://apidocs.chargebee.com/docs/api/in_app_subscriptions)\ + \ created in Google Play Store. Direct manipulation of this object\ + \ via UI or API is disallowed. \n\nIn-App Subscriptions is currently\ + \ in early access. Contact [eap@chargebee.com](mailto:eap@chargebee.com)\ + \ for more information.\n" + enum: + - web + - app_store + - play_store + in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + not_in: + pattern: "^\\[(web|app_store|play_store)(,(web|app_store|play_store))*\\\ + ]$" + type: string + example: APP STORE + deprecated: false + - name: sort_by + in: query + description: "optional, string filter
Sorts\ + \ based on the specified attribute.
Supported attributes : name,\ + \ id, updated_at
Supported sort-orders : asc, desc

Example\ + \ sort_by[asc] = \"name\"\ +
This will sort the result based on the 'name' attribute in ascending(earliest\ + \ first) order." + required: false + style: deepObject + explode: true + schema: + minProperties: 1 + type: object + properties: + asc: + type: string + enum: + - name + - id + - updated_at + desc: + type: string + enum: + - name + - id + - updated_at + additionalProperties: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - item + type: object + properties: + item: + $ref: '#/components/schemas/Item' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + post: + summary: Create an item + description: | + Creates a new item. + operationId: create_an_item + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a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?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - id + - item_family_id + - name + - type + type: object + properties: + id: + maxLength: 100 + type: string + description: | + The identifier for the item. Must be unique and is immutable once set. + deprecated: false + name: + maxLength: 100 + type: string + description: | + A unique display name for the item. Must be unique. This is visible only in Chargebee and not to customers. + deprecated: false + type: + type: string + description: | + The type of the item. \* plan - An essential component of a subscription. Every subscription has exactly one plan. It has a recurring charge and its period defines the billing period of the subscription. \* charge - A non-recurring component that can be added to a subscription in addition to its plan. An charge can also be applied to a customer [directly](./invoices?prod_cat_ver=2#create_invoice_for_a_charge-item) without being applied to a subscription. \* addon - A recurring component that can be added to a subscription in addition to its plan. + deprecated: false + enum: + - plan + - addon + - charge + description: + maxLength: 500 + type: string + description: | + Description of the item. This is visible only in Chargebee and not to customers. + deprecated: false + item_family_id: + maxLength: 100 + type: string + description: | + The `id` of the [Item family](./item_families?prod_cat_ver=2) that the item belongs to. Is mandatory when [Product Families](https://www.chargebee.com/docs/2.0/product-families.html) have been enabled. + deprecated: false + is_giftable: + type: boolean + description: | + Specifies if gift subscriptions can be created for this item. + deprecated: false + default: false + is_shippable: + type: boolean + description: | + Indicates that the item is a physical product. If Orders are enabled in Chargebee, subscriptions created for this item will have orders associated with them. + deprecated: false + default: false + external_name: + maxLength: 100 + type: string + description: | + A unique display name for the item. + deprecated: false + enabled_in_portal: + type: boolean + description: | + Allow customers to change their subscription to this plan via the [Self-Serve Portal](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html). Applies only for plan-items. This requires the Portal configuration to [allow changing subscriptions](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html#allow-change-subscription). Only the in-app version of the Portal is supported for Product Catalog v2. + deprecated: false + default: true + redirect_url: + maxLength: 500 + type: string + description: | + If `enabled_for_checkout`, then the URL to be redirected to once the checkout is complete. This attribute is only available for plan-items. + deprecated: false + enabled_for_checkout: + type: boolean + description: "Allow the plan to subscribed to via Checkout. Applies\ + \ only for plan-items. \n**Note:** Only the in-app version of\ + \ Checkout is supported for Product Catalog v2.\n" + deprecated: false + default: true + item_applicability: + type: string + description: | + Indicates which addon-items and charge-items can be applied to the item. Only possible for plan-items. Other details of attaching items such as whether to attach as a mandatory item or to attach on a certain event, can be specified using the [Create](./attached_items?prod_cat_ver=2#create_an_attached_item) or [Update an attached item](./attached_items?prod_cat_ver=2#update_an_attached_item) API. \* all - all addon-items and charge-items are applicable to this plan-item. \* restricted - only the addon-items or charge-items provided in `applicable_items` can be applied to this plan-item. + deprecated: false + default: all + enum: + - all + - restricted + applicable_items: + type: array + description: | + The list of ids of addon-items and charge-items that can be applied to the plan-item. This parameter can be provided only for plan-items and that too when item_applicability is restricted. Other details of attaching items can be specified using the [Create](./attached_items?prod_cat_ver=2#create_an_attached_item) or [Update an attached item](./attached_items?prod_cat_ver=2#update_an_attached_item) API. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + unit: + maxLength: 30 + type: string + description: "The unit of measure for a quantity-based item. This\ + \ is displayed on the Chargebee UI and on customer facing documents/pages.\ + \ The latter includes [hosted pages](./hosted_pages?prod_cat_ver=2),\ + \ [invoices](./invoices?prod_cat_ver=2) and [quotes](./quotes?prod_cat_ver=2#).\ + \ Examples follow: \n\n* \"user\" for a cloud-collaboration platform.\n\ + * \"GB\" for a data service.\n* \"issue\" for a magazine.\n\n\ + **Note:** `unit` is only exposed via the API to quantity-based\ + \ addons; it is however NOT exposed to quantity-based plans. .\n" + deprecated: false + gift_claim_redirect_url: + maxLength: 500 + type: string + description: | + The URL to redirect to once the gift has been claimed by the receiver. + deprecated: false + included_in_mrr: + type: boolean + description: | + The item is included in MRR calculations for your site. This attribute is only applicable for items of `type = charge` and when the feature is enabled in Chargebee. Note: If the site-level setting is to exclude charge-items from MRR calculations, this value is always returned `false`. + deprecated: false + metered: + type: boolean + description: | + Specifies whether the item undergoes metered billing. When `true`, the quantity is calculated from [usage records](/docs/api/usages?prod_cat_ver=2). When `false`, the `quantity` is as determined while adding an item price to the subscription. Applicable only for items of `type` `plan` or `addon` and when [Metered Billing](https://www.chargebee.com/docs/2.0/metered_billing.html) is enabled. The value of this attribute cannot be changed. + deprecated: false + default: false + usage_calculation: + type: string + description: | + How the quantity is calculated from usage data for the item prices belonging to this item. Only applicable when the item is `metered`. This value overrides the one [set at the site level](https://www.chargebee.com/docs/2.0/metered_billing.html#configuring-metered-billing). . \* sum_of_usages - the net quantity is the sum of the `quantity` of all usages for the current term. \* last_usage - from among the usage records for the [item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) with `usage_date` within the relevant billing period, the `quantity` of the usage record with the most recent `usage_date` is taken as the net quantity consumed. \* max_usage - from among the usage records for the [item price](/docs/api/subscriptions?prod_cat_ver=2#subscription_subscription_items_item_price_id) with `usage_date` within the relevant billing period, the `quantity` of the usage record with the maximum value is taken as the net quantity consumed. + deprecated: false + enum: + - sum_of_usages + - last_usage + - max_usage + metadata: + type: object + additionalProperties: true + description: | + A collection of key-value pairs that provides extra information about the item. \*\*Note:\*\* There's a character limit of 65,535. \[Learn more\](advanced-features#metadata). + deprecated: false + additionalProperties: true + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - item + type: object + properties: + item: + $ref: '#/components/schemas/Item' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /items/{item-id}/delete: + post: + summary: Delete an item + description: | + Deletes an item, marking its `status` as deleted. This is not allowed if there are `active` or `archived` item prices under the item. Once deleted, the id and name of the item can be reused. + operationId: delete_an_item + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?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))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: item-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - item + type: object + properties: + item: + $ref: '#/components/schemas/Item' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /items/{item-id}: + get: + summary: Retrieve an item + description: | + Retrieve an item resource. + operationId: retrieve_an_item + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?: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4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: item-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - item + type: object + properties: + item: + $ref: '#/components/schemas/Item' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + post: + summary: Update an item + description: | + Updates an item with the changes specified. Unspecified item parameters are not modified. + operationId: update_an_item + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4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,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: item-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + name: + maxLength: 100 + type: string + description: | + The display name for the item. Must be unique. This is visible only in Chargebee and not to customers. + deprecated: false + description: + maxLength: 500 + type: string + description: | + Description of the item. This is visible only in Chargebee and not to customers. + deprecated: false + is_shippable: + type: boolean + description: | + Indicates that the item is a physical product. If Orders are enabled in Chargebee, subscriptions created for this item will have orders associated with them. + deprecated: false + default: false + external_name: + maxLength: 100 + type: string + description: | + A unique display name for the item. + deprecated: false + item_family_id: + maxLength: 100 + type: string + description: | + The `id` of the [Item family](./item_families?prod_cat_ver=2) that the item belongs to. Is mandatory when [Product Families](https://www.chargebee.com/docs/2.0/product-families.html) have been enabled. + deprecated: false + enabled_in_portal: + type: boolean + description: | + Allow customers to change their subscription to this plan via the [Self-Serve Portal](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html). Applies only for plan-items. This requires the Portal configuration to [allow changing subscriptions](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html#allow-change-subscription). + deprecated: false + default: true + redirect_url: + maxLength: 500 + type: string + description: | + If `enabled_for_checkout`, then the URL to be redirected to once the checkout is complete. This parameter is only meant for plan-items. + deprecated: false + enabled_for_checkout: + type: boolean + description: "Allow the plan to subscribed to via Checkout. Applies\ + \ only for plan-items. \n**Note:** Only the in-app version of\ + \ Checkout is supported for Product Catalog v2.\n" + deprecated: false + default: true + item_applicability: + type: string + description: | + Indicates which addon-items and charge-items can be applied to the item. Only possible for plan-items. Other details of attaching items such as whether to attach as a mandatory item or to attach on a certain event, can be specified using the [Create](./attached_items?prod_cat_ver=2#create_an_attached_item) or [Update an attached item](./attached_items?prod_cat_ver=2#update_an_attached_item) API. \* all - all addon-items and charge-items are applicable to this plan-item. \* restricted - only the addon-items or charge-items provided in `applicable_items` can be applied to this plan-item. + deprecated: false + default: all + enum: + - all + - restricted + applicable_items: + type: array + description: | + The list of ids of addon-items and charge-items that can be applied to the plan-item. This parameter can be provided only for plan-items and that too when item_applicability is restricted. Other details of attaching items can be specified using the [Create](./attached_items?prod_cat_ver=2#create_an_attached_item) or [Update an attached item](./attached_items?prod_cat_ver=2#update_an_attached_item) API. + deprecated: false + items: + maxLength: 100 + type: string + deprecated: false + unit: + maxLength: 30 + type: string + description: "The unit of measure for a quantity-based item. This\ + \ is displayed on the Chargebee UI and on customer facing documents/pages.\ + \ The latter includes [hosted pages](./hosted_pages?prod_cat_ver=2),\ + \ [invoices](./invoices?prod_cat_ver=2) and [quotes](./quotes?prod_cat_ver=2#).\ + \ Examples follow: \n\n* \"user\" for a cloud-collaboration platform.\n\ + * \"GB\" for a data service.\n* \"issue\" for a magazine.\n\n\ + **Note:** `unit` is only exposed via the API to quantity-based\ + \ addons; it is however NOT exposed to quantity-based plans. .\n" + deprecated: false + gift_claim_redirect_url: + maxLength: 500 + type: string + description: | + The URL to redirect to once the gift has been claimed by the receiver. + deprecated: false + metadata: + type: object + additionalProperties: true + description: | + A collection of key-value pairs that provides extra information about the item. \[Learn more\](advanced-features#metadata). + deprecated: false + included_in_mrr: + type: boolean + description: | + The item is included in MRR calculations for your site. This attribute is only applicable for items of `type = charge` and when the feature is enabled in Chargebee. Note: If the site-level setting is to exclude charge-items from MRR calculations, this value is always returned `false`. + deprecated: false + status: + type: string + description: | + The status of the item. \* active - The item can be used to create new item prices. \* deleted - Indicates that the item has been [deleted](./items?prod_cat_ver=2#delete_an_item). The `id` and `name` can be reused. Deleted items can be retrieved using [List items](./items?prod_cat_ver=2#list_items). \* archived - The item is no longer active and no new item prices can be created + deprecated: false + enum: + - active + - archived + additionalProperties: true + encoding: {} + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - item + type: object + properties: + item: + $ref: '#/components/schemas/Item' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /price_variants/{price-variant-id}/delete: + post: + summary: Delete a price variant + description: | + Deletes the price variant. This is not allowed if price variant is attached to any [item price](https://apidocs.chargebee.com/docs/api/item_prices?lang=curl). Once deleted, the `id` and `name` of the price variant can be reused. + operationId: delete_a_price_variant + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\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9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: price-variant-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - price_variant + type: object + properties: + price_variant: + $ref: '#/components/schemas/PriceVariant' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /price_variants: + get: + summary: List price variants + description: | + This endpoint is used to retrieve a list of price variants. + operationId: list_price_variants + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2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a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: id + in: query + description: "optional, string filter
Filter\ + \ variant based on their id.
Supported operators\ + \ : is, is_not, starts_with, in, not_in

Example id[is] = \"basic\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: basic + deprecated: false + - name: name + in: query + description: "optional, string filter
Filter\ + \ variant based on their names.
Supported operators :\ + \ is, is_not, starts_with, in, not_in

Example name[is] = \"basic\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + minLength: 1 + type: string + is_not: + minLength: 1 + type: string + starts_with: + minLength: 1 + type: string + in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + not_in: + pattern: "^\\[(.*)(,.*)*\\]$" + type: string + example: basic + deprecated: false + - name: status + in: query + description: "optional, enumerated string filter
Filter\ + \ variant based on their status. Possible values are : active,\ + \ archived.
Supported operators : is, is_not, in, not_in

Example\ + \ status[is] = \"active\"\ + " + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + is: + type: string + description: | + \* \`active\` - Active \* \`archived\` - Archived + enum: + - active + - archived + is_not: + type: string + description: | + \* \`active\` - Active \* \`archived\` - Archived + enum: + - active + - archived + in: + pattern: "^\\[(active|archived)(,(active|archived))*\\]$" + type: string + not_in: + pattern: "^\\[(active|archived)(,(active|archived))*\\]$" + type: string + example: active + deprecated: false + - name: updated_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
Filter product based on their updated time.
Supported\ + \ operators : after, before, on, between

Example updated_at[on] = \"1243545465\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1243545465" + deprecated: false + - name: created_at + in: query + description: "optional, timestamp(UTC) in seconds\ + \ filter
Filter product based on their created time.
Supported\ + \ operators : after, before, on, between

Example created_at[before] = \"1243545465\"" + required: false + deprecated: false + style: deepObject + explode: true + schema: + type: object + properties: + after: + pattern: "^\\d{10}$" + type: string + format: unix-time + before: + pattern: "^\\d{10}$" + type: string + format: unix-time + "on": + pattern: "^\\d{10}$" + type: string + format: unix-time + between: + pattern: "^\\[\\d{10},\\d{10}\\]$" + type: string + example: "1243545465" + deprecated: false + - name: sort_by + in: query + description: "optional, string filter
Sorts\ + \ based on the specified attribute.
Supported attributes : name,\ + \ id, status, created_at, updated_at
Supported sort-orders :\ + \ asc, desc

Example sort_by[asc] = \"name\"
This will sort the result\ + \ based on the 'name' attribute in ascending(earliest first) order." + required: false + style: deepObject + explode: true + schema: + minProperties: 1 + type: object + properties: + asc: + type: string + enum: + - name + - id + - status + - created_at + - updated_at + desc: + type: string + enum: + - name + - id + - status + - created_at + - updated_at + additionalProperties: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - price_variant + type: object + properties: + price_variant: + $ref: '#/components/schemas/PriceVariant' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + post: + summary: Create a price variant + description: | + This endpoint allows the creation of a new price variant that can be attached to [item prices](https://apidocs.chargebee.com/docs/api/item_prices?lang=curl). + operationId: create_a_price_variant + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(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?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + requestBody: + content: + application/x-www-form-urlencoded: + schema: + required: + - id + - name + type: object + properties: + id: + maxLength: 100 + type: string + description: | + The unique and immutable identifier of the price variant. + deprecated: false + name: + maxLength: 100 + type: string + description: | + A unique name of the price variant. + deprecated: false + external_name: + maxLength: 100 + type: string + description: | + A unique display name for the price variant. + deprecated: false + description: + maxLength: 500 + type: string + description: | + Description of the price variant. + deprecated: false + attributes: + required: + - name + - value + type: object + properties: + name: + type: array + description: | + Attribute name + items: + maxLength: 100 + type: string + deprecated: false + value: + type: array + description: | + Attribute value + items: + maxLength: 100 + type: string + deprecated: false + description: | + The list of price variant attribute values. Attributes can be used to store additional information about the price variant. For example, for a price variant called 'Germany', the attributes can be 'Country':'Germany', 'City':'Berlin' and so on. + deprecated: false + encoding: + attributes: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - price_variant + type: object + properties: + price_variant: + $ref: '#/components/schemas/PriceVariant' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /price_variants/{price-variant-id}: + get: + summary: Retrieve a price variant + description: | + This endpoint retrieves the details of a specific price variant using its unique identifier. + operationId: retrieve_a_price_variant + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-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,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: price-variant-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - price_variant + type: object + properties: + price_variant: + $ref: '#/components/schemas/PriceVariant' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + post: + summary: Update a price variant + description: | + This endpoint modifies the details of an existing price variant. + operationId: update_a_price_variant + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|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|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: price-variant-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + name: + maxLength: 100 + type: string + description: | + A unique name of the price variant. + deprecated: false + external_name: + maxLength: 100 + type: string + description: | + A unique display name for the price variant. + deprecated: false + description: + maxLength: 500 + type: string + description: | + Description of the price variant. + deprecated: false + status: + type: string + description: | + Status of a price variant. \* active - Active price variant. This price variant can be attached to [item prices](https://apidocs.chargebee.com/docs/api/item_prices?lang=curl). \* deleted - Deleted price variant. The `id` and `name` of the deleted price variant can be reused. \* archived - Archived price variant. This price variant is no longer `active` and cannot be attached to new [item prices](https://apidocs.chargebee.com/docs/api/item_prices?lang=curl). Existing item prices that already have this price variant attached will continue to remain as is. + deprecated: false + enum: + - active + - archived + attributes: + required: + - name + - value + type: object + properties: + name: + type: array + description: | + Attribute name + items: + maxLength: 100 + type: string + deprecated: false + value: + type: array + description: | + Attribute value + items: + maxLength: 100 + type: string + deprecated: false + description: | + The list of price variant attribute values. Attributes can be used to store additional information about the price variant. For example, for a price variant called 'Germany', the attributes can be 'Country':'Germany', 'City':'Berlin' and so on. + deprecated: false + encoding: + attributes: + style: deepObject + explode: true + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - price_variant + type: object + properties: + price_variant: + $ref: '#/components/schemas/PriceVariant' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /item_prices/{item-price-id}/applicable_items: + get: + summary: List applicable items for a plan-item price + description: | + Returns the set of all applicable [addon-items](items?prod_cat_ver=2#addon-items) for a specific [plan-item price](item_prices?prod_cat_ver=2#types). This set consists of all addon-items whose item prices can be applied to a subscription having the plan-item price in it. When determining this set, Chargebee considers the [item_applicability](items?prod_cat_ver=2#item_item_applicability) and [applicable_items](items?prod_cat_ver=2#item_applicable_items) defined for the parent item of the plan-item price. + operationId: list_applicable_items_for_a_plan-item_price + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1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" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: item-price-id + in: path + required: true + style: simple + explode: false + schema: + type: string + - name: limit + in: query + description: The number of resources to be returned. + required: false + style: form + explode: true + schema: + maximum: 100 + minimum: 1 + type: integer + format: int32 + default: 10 + - name: offset + in: query + description: "Determines your position in the list for pagination. To ensure\ + \ that the next page is retrieved correctly, always set offset\ + \ to the value of next_offset obtained in the previous iteration\ + \ of the API call." + required: false + style: form + explode: true + schema: + maxLength: 1000 + type: string + - name: sort_by + in: query + description: "optional, string filter
Sorts\ + \ based on the specified attribute.
Supported attributes : name,\ + \ id, updated_at
Supported sort-orders : asc, desc

Example\ + \ sort_by[asc] = \"name\"\ +
This will sort the result based on the 'name' attribute in ascending(earliest\ + \ first) order." + required: false + style: deepObject + explode: true + schema: + minProperties: 1 + type: object + properties: + asc: + type: string + enum: + - name + - id + - updated_at + desc: + type: string + enum: + - name + - id + - updated_at + additionalProperties: false + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - list + type: object + properties: + list: + type: array + items: + required: + - item + type: object + properties: + item: + $ref: '#/components/schemas/Item' + next_offset: + maxLength: 1000 + type: string + description: This attribute is returned only if more resources + are present. To fetch the next set of resources use this value + for the input parameter `offset`. + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + /item_prices/{item-price-id}: + get: + summary: Retrieve an item price + description: | + This API retrieves a specific item price using the id. + operationId: retrieve_an_item_price + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A-Fa-f0-9])$|^(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,1}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,2}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: item-price-id + in: path + required: true + style: simple + explode: false + schema: + type: string + responses: + "200": + description: on success + content: + application/json: + schema: + required: + - item_price + type: object + properties: + item_price: + $ref: '#/components/schemas/ItemPrice' + "400": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/400' + "401": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/401' + "403": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/403' + "404": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/404' + "405": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/405' + "409": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/409' + "422": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/422' + "429": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/429' + "500": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/500' + "503": + description: on error + content: + application/json: + schema: + $ref: '#/components/schemas/503' + deprecated: false + security: + - BasicAuth: [] + post: + summary: Update an item price + description: | + Updates an item price with the changes specified. Unspecified item price attributes are not modified. + operationId: update_an_item_price + parameters: + - name: chargebee-request-origin-device + in: header + description: The device from which the customer has made the request + required: false + style: simple + explode: false + schema: + type: string + description: | + The device from which the customer has made the request + example: Android + - name: chargebee-request-origin-user + in: header + description: The email address of your customer/user. Use this when the email + address has only ASCII characters. + required: false + style: simple + explode: false + schema: + type: string + description: | + The email address of your customer/user. Use this when the email address has only ASCII characters. + format: email + example: user@example.com + - name: chargebee-request-origin-user-encoded + in: header + description: "The Base64-encoded email address of your customer/user. Use\ + \ this if the email address has UTF-8 characters. When this header is provided,\ + \ the header `chargebee-request-origin-user` is ignored." + required: false + style: simple + explode: false + schema: + type: string + description: | + The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header \`chargebee-request-origin-user\` is ignored. + format: email + example: dXNlci7QutCy0ZbRgtC+0YfQutCwQGV4YW1wbGUuY29t + - name: chargebee-request-origin-ip + in: header + description: The IP address of the customer where the request originated + required: false + style: simple + explode: false + schema: + pattern: "^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-fA-F]|[a-fA-F][a-fA-F0-9\\\ + -]*[a-fA-F0-9])\\.)*([A-Fa-f]|[A-Fa-f][A-Fa-f0-9\\-]*[A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0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,3}(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:[0-9a-fA-F]{1,4})):)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,4}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\\ + .){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::)))))$" + type: string + description: | + The IP address of the customer where the request originated + example: 192.168.1.2 + - name: chargebee-event-actions + in: header + description: skip all actions to be done on the events + required: false + style: simple + explode: false + schema: + type: string + description: | + skip all actions to be done on the events + enum: + - all-disabled + - name: chargebee-event-email + in: header + description: skip only emails + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only emails + enum: + - all-disabled + - name: chargebee-event-webhook + in: header + description: ' skip only webhooks' + required: false + style: simple + explode: false + schema: + type: string + description: | + skip only webhooks + enum: + - all-disabled + - name: chargebee-business-entity-id + in: header + description: "If the site has multiple business entities, you can use this\ + \ custom HTTP header to specify the business entity for which Chargebee\ + \ should perform the operation." + required: false + style: simple + explode: false + schema: + maxLength: 50 + type: string + description: | + If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation. + - name: item-price-id + in: path + required: true + style: simple + explode: false + schema: + type: string + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + name: + maxLength: 100 + type: string + description: | + A unique display name for the item price in the Chargebee UI. If `external_name` is not provided, this is also used in customer-facing pages and documents such as [invoices](./invoices?prod_cat_ver=2) and [hosted pages](hosted_pages?prod_cat_ver=2). + deprecated: false + description: + maxLength: 500 + type: string + description: "Description of the item price. \n**Note:** \n\ + If your input contains characters that are subjected to sanitization\ + \ (like incomplete HTML tags), the sanitization process might\ + \ increase the length of your input. If the sanitized input exceeds\ + \ the limit, your request will be rejected.\n" + deprecated: false + proration_type: + type: string + description: | + **Note** + + Applicable only for item prices with: + + * [item_type](item_prices#item_price_item_type) = `addon`. + * [pricing_model](item_prices#item_price_pricing_model) = `per_unit`. + Specifies how to manage charges or credits for the addon item price during a [subscription update](subscriptions?prod_cat_ver=2#update_subscription_for_items) or [estimating](estimates?prod_cat_ver=2#estimate_for_updating_a_subscription) a subscription update. \* full_term - Charge the full price of the addon item price or give the full credit. Don't apply any proration. \* site_default - Use the [site-wide proration setting](https://www.chargebee.com/docs/2.0/proration.html#proration-for-subscription-change). \* partial_term - Prorate the charges or credits for the rest of the current term. + deprecated: false + enum: + - site_default + - partial_term + - full_term + price_variant_id: + maxLength: 100 + type: string + description: | + An immutable unique identifier of a [price variant](price_variants). + deprecated: false + status: + type: string + description: | + The status of the item price. \* archived - The item price is no longer active and cannot be used in new subscriptions or added to existing ones. Existing subscriptions that already have this item price will continue to renew with the item price. \* active - The item price can be used in subscriptions. \* deleted - Indicates that the item price has been deleted. The `id` and `name` can be reused. + deprecated: false + enum: + - active + - archived + external_name: + maxLength: 100 + type: string + description: | + The name of the item price used in customer-facing pages and documents. These include [invoices](./invoices?prod_cat_ver=2) and [hosted pages](hosted_pages?prod_cat_ver=2). If not provided, then `name` is used. + deprecated: false + currency_code: + maxLength: 3 + type: string + description: | + The currency code ([ISO 4217 format](https://www.chargebee.com/docs/2.0/supported-currencies.html)) for the item price. If subscriptions, invoices or [differential prices](./differential_prices?prod_cat_ver=2) exist for this item price, `currency_code` cannot be changed. + deprecated: false + invoice_notes: + maxLength: 2000 + type: string + description: | + A customer-facing note added to all invoices associated with this API resource. This note becomes one among [all the notes](/docs/api/invoices#invoice_notes) displayed on the invoice PDF. + deprecated: false + is_taxable: + type: boolean + description: | + Specifies whether taxes apply to this item price. This value is set and returned even if [Taxes](https://www.chargebee.com/docs/tax.html) have been disabled in Chargebee. However, the value is effective only while Taxes are enabled. + deprecated: false + default: true + free_quantity: + minimum: 0 + type: integer + description: | + Free quantity the subscriptions of this item_price will have. Only the quantity more than this will be charged for the subscription. + format: int32 + deprecated: false + default: 0 + free_quantity_in_decimal: + maxLength: 33 + type: string + description: | + The quantity of the item that is available free-of-charge, represented in decimal. When a subscription is created for this plan or when the plan of a subscription is changed to this one, only the quantity above this number is charged for. Applicable for quantity-based plans and only when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units) is enabled. + deprecated: false + metadata: + type: object + additionalProperties: true + description: | + A collection of key-value pairs that provides extra information about the item price. \*\*Note:\*\* There's a character limit of 65,535. \[Learn more\](advanced-features#metadata). + deprecated: false + pricing_model: + type: string + description: | + The [pricing scheme](https://www.chargebee.com/docs/2.0/plans.html#pricing-models) for this item price. If subscriptions, invoices or [differential prices](./differential_prices?prod_cat_ver=2) exist for this item price, `pricing_model` cannot be changed. + \* tiered - The per unit price is based on the tier that the total quantity falls in. + \* per_unit - A fixed price per unit quantity. + \* flat_fee - A fixed price that is not quantity-based. + \* volume - There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers. + \* stairstep - A quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in. + deprecated: false + default: flat_fee + enum: + - flat_fee + - per_unit + - tiered + - volume + - stairstep + price: + minimum: 0 + type: integer + description: | + The cost of the item price when the pricing model is `flat_fee`. When the pricing model is `per_unit`, it is the price per unit quantity of the item. Not applicable for the other pricing models. The value is in the [minor unit of the currency](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units). + format: int64 + deprecated: false + price_in_decimal: + maxLength: 39 + type: string + description: | + The price of the item when the pricing_model is `flat_fee`. When the pricing model is `per_unit`, it is the price per unit quantity of the item. Not applicable for the other pricing models. The value is in decimal and in major units of the currency. Also, this is only applicable when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api/currencies#handling_currency_units) is enabled. + deprecated: false + period_unit: + type: string + description: | + The unit of time for `period`. If subscriptions or invoices exist for this item price, `period_unit` cannot be changed. The `period_unit` is mandatory when the item `type` is `plan` or `addon`. \* month - A period of 1 calendar month. \* week - A period of 7 days. \* year - A period of 1 calendar year. \* day - A period of 24 hours. + deprecated: false + enum: + - day + - week + - month + - year + period: + minimum: 1 + type: integer + description: |2 + + + * When the item `type` is `plan`: The billing period of the plan in `period_unit`s. For example, create a 6 month plan by providing `period` as 6 and `period_unit` as month. + * When item `type` is `addon`: The period of the addon in `period_unit`s. For example, create an addon with a 2 month `period` by providing period as 2 and `period_unit` as `month`. The period of an addon is the duration for which its `price` applies. When attached to a plan, the addon is billed for the billing period of the plan. [Learn more.](https://www.chargebee.com/docs/2.0/addons-billingcycle.html) + + + + If subscriptions or invoices exist for this item price, `period` cannot be changed. The `period` is mandatory when the item `type` is `plan` or `addon`. + format: int32 + deprecated: false + trial_period_unit: + type: string + description: | + The unit of time for `trial_period`. \* month - A period of 1 calendar month. \* day - A period of 24 hours. + deprecated: false + enum: + - day + - month + trial_period: + minimum: 0 + type: integer + description: | + The trial period of the plan in `trial_period_unit`s. You can also set [trial periods for addons](https://www.chargebee.com/docs/2.0/addons-trial.html); contact [Support](https://chargebee.freshdesk.com/support/home) to enable that feature. + format: int32 + deprecated: false + shipping_period: + minimum: 1 + type: integer + description: | + Defines the shipping frequency. Example: to bill customer every 2 weeks, provide "2" here. + format: int32 + deprecated: false + shipping_period_unit: + type: string + description: | + Defines the shipping frequency in association with shipping period. \* day - A period of 24 hours. \* week - A period of 7 days. \* year - A period of 1 calendar year. \* month - A period of 1 calendar month. + deprecated: false + enum: + - day + - week + - month + - year + billing_cycles: + minimum: 1 + type: integer + description: | + The default number of billing cycles a subscription to the plan must run. Can be [overridden](./subscriptions?prod_cat_ver=2) for a subscription. + + Addons can also [have billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html). However, you must contact [Support](https://chargebee.freshdesk.com/support/home) to enable that. Also, for addons, you can [override this](./attached_items?prod_cat_ver=2) while attaching it to a plan. However, if you provide the value while [applying the addon to a subscription](./subscriptions?prod_cat_ver=2#subscription_subscription_items_item_type), then that value takes still higher precedence. + If subscriptions, invoices or [differential prices](./differential_prices?prod_cat_ver=2) exist for this item price, `billing_cycles` cannot be changed. + format: int32 + deprecated: false + trial_end_action: + type: string + description: | + Applicable only when [End-of-trial Action](https://www.chargebee.com/docs/trial_periods.html#how-to-define-the-end-of-trial-actions-for-subscriptions) has been enabled for the site. Specifies the operation to be carried out for the subscription once the trial ends. Whenever the `item.type` is `plan` and a trial period is defined for this item price, this attribute (parameter) is returned (required). This can be overridden at the [subscription-level](subscriptions?prod_cat_ver=2#subscription_trial_end_action). \* cancel_subscription - The subscription cancels. \* activate_subscription - The subscription activates and charges are raised for non-metered items. \* site_default - The action [configured for the site](https://www.chargebee.com/docs/trial_periods.html#how-to-define-the-end-of-trial-actions-for-subscriptions) at the time when the trial ends, takes effect. + deprecated: false + enum: + - site_default + - activate_subscription + - cancel_subscription + show_description_in_invoices: + type: boolean + description: | + Whether the item price's description should be shown on [invoice PDFs](/docs/api/invoices#retrieve_invoice_as_pdf). If this Boolean is changed, only invoices generated (or [regenerated](https://www.chargebee.com/docs/invoice-operations.html#actions-for-payment-due-not-paid-invoices_regenerate-invoice)) after the change are affected; past invoices are not. + deprecated: false + show_description_in_quotes: + type: boolean + description: | + Whether the item price's description should be shown on [quote PDFs](/docs/api/quotes#retrieve_quote_as_pdf). If this Boolean is changed, only quotes created after the change are affected; past quotes are not. + deprecated: false + tax_detail: + type: object + properties: + tax_profile_id: + maxLength: 50 + type: string + description: | + The tax profile of the item price. + deprecated: false + avalara_tax_code: + maxLength: 50 + type: string + description: | + The [Avalara tax codes](https://taxcode.avatax.avalara.com) for the item price. Applicable only if you use [AvaTax for Sales integration](https://www.chargebee.com/docs/2.0/avatax-for-sales.html). + deprecated: false + hsn_code: + maxLength: 50 + type: string + description: | + The [HSN code](https://cbic-gst.gov.in/gst-goods-services-rates.html) to which the item is mapped for calculating the customer's tax in India. Applicable only when both of the following conditions are true: + + * **[India](https://www.chargebee.com/docs/indian-gst.html#configuring-indian-gst)** has been enabled as a **Tax Region**. (An error is returned when this condition is not true.) + * The [**AvaTax for Sales** integration](https://www.chargebee.com/docs/avalara.html) has been enabled in Chargebee. + deprecated: false + avalara_sale_type: + type: string + description: | + Indicates the [Avalara sale type](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/transaction-information/#lineitem) for the item price. Applicable only if you use the [AvaTax for Communications integration](https://www.chargebee.com/docs/2.0/avatax-for-communication.html). \* vendor_use - Transaction is for an item that is subject to vendor use tax \* consumed - Transaction is for an item that is consumed directly \* wholesale - Transaction is a sale to another company that will resell your product or service to another consumer \* retail - Transaction is a sale to an end user + deprecated: false + enum: + - wholesale + - retail + - consumed + - vendor_use + avalara_transaction_type: + type: integer + description: | + Indicates the [Avalara transaction type](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/transaction-information/#lineitem) for the item price. Applicable only if you use the [AvaTax for Communications integration](https://www.chargebee.com/docs/2.0/avatax-for-communication.html). + format: int32 + deprecated: false + avalara_service_type: + type: integer + description: | + Indicates the [Avalara service type](https://developer.avalara.com/communications/dev-guide_rest_v2/customizing-transactions/sample-transactions/transaction-information/#lineitem) for the item price. Applicable only if you use the [AvaTax for Communications integration](https://www.chargebee.com/docs/2.0/avatax-for-communication.html). + format: int32 + deprecated: false + taxjar_product_code: + maxLength: 50 + type: string + description: | + The [TaxJar product code](https://developers.taxjar.com/api/reference/#get-list-tax-categories) for the item price. Applicable only if you use [TaxJar integration](https://www.chargebee.com/docs/2.0/taxjar.html). + deprecated: false + description: | + Parameters for tax_detail + deprecated: false + accounting_detail: + type: object + properties: + sku: + maxLength: 100 + type: string + description: | + This maps to the sku or product name in the accounting integration. + deprecated: false + accounting_code: + maxLength: 100 + type: string + description: | + The identifier of the chart of accounts under which the item price falls in the accounting system. + deprecated: false + accounting_category1: + maxLength: 100 + type: string + description: |+ + Used exclusively with the following [accounting integrations](https://www.chargebee.com/docs/2.0/finance-integration-index.html ) + + * [**Xero:**](https://www.chargebee.com/docs/2.0/xero.html )If you've categorized your products in Xero, provide the category name and option. Use the format: `: